Overlay
HoverCard
A preview of what a link points at, shown while the pointer rests on it or focus reaches it.
WAI-ARIA tested
Import
main.ts
import { HoverCard } from '@vitral/vue';Basic
Built by @vitral and friends.
Placement and delays
API
Read from packages/vue/src/components/HoverCard/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| openDelay | number | Milliseconds the pointer (or keyboard focus) rests before the card opens. Defaults to 700. |
| closeDelay | number | Milliseconds after the pointer leaves before it closes. Defaults to 300. |
| placement | OverlayPlacement | Where it opens relative to the trigger. Defaults to `'bottom'`. |
| offset | number | Gap to the trigger, in pixels. Defaults to 8. |
| disabled | boolean | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| show | — | — |
| hide | — | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| trigger | — | What opens the card, usually a link, which keeps working on its own. |
| default | — | The card's content: a preview of what the trigger points at. |