Micro-interactions

Hover List

A display-type list where a shared accent block springs between rows on hover while the text indents and inverts.

Install

bun add motion clsx tailwind-merge

Then copy 2 files into your project:

  • components/registry/hover-list/hover-list.tsx
  • lib/utils.ts

Props

PropTypeDefaultDescription
highlightColorstring (hex)"#a855f7"Color of the sliding highlight block.
invertedColorstring (hex)"#000000"Text and icon color while a row is highlighted.
stiffnessnumber300Spring stiffness of the sliding highlight.
dampingnumber30Spring damping — lower rings longer.
indentnumber32How far the row content slides right on hover.
textSize"sm" | "md" | "lg""md"Display type scale of the rows.
showIconbooleantrueRotate a crosshair icon in on hover.
roundednumber0Corner radius of the highlight block.

What It Demonstrates

Hover effect
Visual change when the cursor moves over an element.
Layout animation
When an element's size or position changes, it animates to the new spot instead of snapping.
Spring
Motion driven by physics (tension, mass, damping) rather than a set duration.
Continuity transition
A change that keeps the user oriented by visually connecting before and after. For example, making the same rectangle bigger and smaller.

Related Components

Appears In