Shared highlight
A highlight that glides between the items of a list as focus or hover moves.
When to use
- Menus, tab strips and lists where one item is active.
- You want one moving indicator instead of per-row backgrounds.
When not to use
- The list is long and scrolls; the glide becomes distracting.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/shared-highlight
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-hidden and aria-current in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/shared-highlight.mdThe index of every part is at /llms.txt.