# KptPeek (kpt-peek) A peek card - content tied to what you are looking at, shown without leaving the text. Hover opens it, the card itself is interactive (links, buttons), and a click pins it. Requires `import '@angular/cdk/overlay-prebuilt.css';` Import: `import { KptPeek, KptPeekTrigger } from '@konce-pt/angular';` ## Slots - the element carrying the `kptPeekTrigger` attribute = the trigger; everything else = the card ## Inputs / outputs - `placement`: 'top' | 'bottom' (default 'bottom') - CDK flips it when there is no room; near the right edge of the window the card opens leftwards, and when neither side fits it is pushed into view - `openDelay`: number (default 300) - the wait before hover opens the card - `closeDelay`: number (default 200) - the wait before leaving the trigger closes it - `disabled`: boolean - the card never opens; the trigger stays a plain link or button - `label`: string - the card's accessible name; without it the trigger's text is used - `(opened)`, `(closed)` -> `void` - the moment to fetch the card's data ## Example @Anna Kowalska Profile, projects, contact... ## Which of the three `kptTooltip` carries plain text and cannot be clicked (`pointer-events: none`), so a link inside it is unreachable. `kpt-popover` opens on click and puts a backdrop over the page, so it is a small modal. `kpt-peek` sits between them: it opens on hover, the card is interactive, and nothing is covered. ## Hover is not the only way in Hover opens after `openDelay` and leaving closes after `closeDelay` - the pointer needs time to travel from the trigger to the card, so entering the card cancels the close. Focus opens it with no delay (a keyboard does not sweep across elements by accident). A click, Enter or a tap **pins** the card: it stays after the pointer leaves and focus moves inside it. That is the only route to the card's content where there is no hover at all, so interactive content stays reachable on touch and from the keyboard. Escape closes it and hands focus back to the trigger; so does a click outside. Escape on the trigger itself closes a card opened by hover or focus without moving focus (WCAG 1.4.13); with the card closed the key passes through to an enclosing dialog. ## Accessibility The trigger keeps its own role (a link stays a link) and carries `aria-expanded` plus `aria-controls` while the card is open. The card is `role="dialog"` with a name from `label` or the trigger's text. It is not a focus trap - the card is not modal and the page stays usable. ## Tokens `--kpt-color-surface-raised`, `--kpt-color-border`, `--kpt-elevation-3`, `--kpt-color-focus-ring`.