Shared Layout Background

A pill that glides between hovered items via motion's shared layout, with blur enter/exit.

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/shared-layout-bg

API Reference

as?
"div" | "ul"

Semantic container used for the children.

div
pillClassName?
string

Tailwind class applied to the moving pill. Defaults to a subtle foreground tint.

inset?
number

Horizontal inset of the pill relative to each row (px). Default 20.

20
pillContainerClassName?
string

Optional positioning override for the pill wrapper inside each item.

className?
string

Updated