Hover Card
A card that opens on hover or focus to preview what a link points to, such as a product with its image, price and rating.
Parts
| Part | File | Does |
|---|---|---|
| HoverCard | HoverCard.vue | Groups all parts of the hover card. |
| HoverCardContent | HoverCardContent.vue | Holds what the hover card shows while open. |
| HoverCardTrigger | HoverCardTrigger.vue | Opens the hover card when the user hovers over it. |
Anatomy
<HoverCard>
<HoverCardTrigger />
<HoverCardContent />
</HoverCard>Styling
All of Hover Card’s styles live in hover-card.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @vueuse/core
- reka-ui
API reference
Groups all parts of the hover card.
Props 5
| Prop | Type | Default | |
|---|---|---|---|
| defaultOpen | boolean | false | |
| |||
| open | boolean | — | |
| |||
| openDelay | number | 700 | |
| |||
| closeDelay | number | 300 | |
| |||
| enableTouch | boolean | false | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| update:open | value: boolean | |
| ||
Slots 1
| Slot | Slot props | |
|---|---|---|
| default | { open: boolean; } | |
| ||