Skip to content

HoverCard

Show more information on hover, focus, or tap.

alpina-ui/interactive/hover-card

Interactive preview

Usage notes

Touch users get a taller trigger. Long panel text wraps and the panel fits the visible viewport while remaining reachable by keyboard.

When to use

Offer an optional preview of a person or record next to a link to its full details.

When to avoid

Keep essential decisions and touch-only actions available by activation elsewhere.

Accessibility

Make the preview reachable from its trigger by keyboard. Give people a direct way to open the full record outside the preview.

Keys
KeyAction
Tab / Shift+TabFocus the trigger to show the card. Continue to links or controls it contains.
Enter / SpacePin or unpin the card from its trigger.
EscapeDismiss the card. If focus was inside, it returns to the trigger.

Content

Use the record name as the title and one identifying detail beneath it. A short destination label can lead to the full record.

Use
Anna Caduff / Secretariat / View profile
Avoid
More about this

Copy in four languages

German
Profil ansehen14 characters
French
Voir le profil14 characters
Italian
Vedi profilo12 characters
Romansh
Guardar il profil17 characters
Add to your project
npx --no-install alpina add hover-card