Skip to contentKino
Skip to Content

Hover card

A card that previews what a link points to, on hover and focus, and slides between the links of a group.

npx shadcn add https://kinoui.com/r/hover-card.json
Share on

Examples

Assigned to @Maya Chen

Default

It grows out from under its link after a short wait, and folds back into it.

Group

Hover cards in a HoverCardGroup share one card, which slides from link to link.

Installation

npx shadcn@latest add https://kinoui.com/r/hover-card.json
Files
lib/reduce-motion.tslib/scroll.tslib/popup.tslib/glide.tsxcomponents/kino/hover-card.tsx
Packages
@base-ui/react

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

HoverCard

PropTypeDefaultDescription
openbooleanNoneWhether it is open, when you hold the state.
onOpenChange(open, details) => voidNoneCalled when it opens or closes.

HoverCardTrigger

PropTypeDefaultDescription
delaynumber200How long the pointer rests on the link before the card opens, in milliseconds.

HoverCardContent

PropTypeDefaultDescription
side'left''top''bottom''right''inline-start''inline-end''bottom'The side of the link it opens on.
align'start''center''end''center'How it lines up with the link along that side.
classNamestringNoneGoes to the content inside the card: w-80, with padding and a gap, unless you set others.

Accessibility

  • It opens on hover and on keyboard focus of the link, and Escape closes it.
  • The link still goes where it points; the card only previews it, so put nothing in the card that the page behind the link doesn’t have.
  • Content taller than the space left on screen scrolls inside the card.
  • When the system asks for less motion, it only fades.