Velora UI

Card Hover Effect

Link-card grid with a highlight that glides to whichever card you hover or focus.

  • 1.7 KB gzipped
  • Deps: motion/react
  • Reduced-motion safe
  • Base UI & Radix compatible
Open in v0

Installation

pnpm dlx shadcn@latest add https://velora.colorlib.com/r/card-hover-effect.json

Adds components/velora/card-hover-effect.tsx, installs motion.

Examples

Props

PropTypeDefault
items*

The link cards, in order

HoverCardItem[]—
columns

Column count once the container is wide enough (container queries)

1 | 2 | 3 | 43

Also accepts every <div> attribute, forwarded to the root element.

HoverCardItem

interface HoverCardItem {
  /** Card heading */
  title: string;
  /** One or two sentences under the title */
  description: string;
  /** Link target; the whole card is the link */
  href: string;
  /** Optional leading icon, e.g. a lucide-react element */
  icon?: React.ReactNode;
}

Accessibility

Reduced motion
The highlight appears on the hovered or focused card and disappears instantly, without gliding or fading; the arrow nudge is removed.
Keyboard
Each card is a native link in Tab order; focusing one moves the highlight to it, and it clears when focus leaves the grid.
Screen readers
Cards are links in a list, named by their title and description text; icons, the arrow and the highlight are aria-hidden.