crucıble

Detent

Animated tabs with a shared-layout sliding pill indicator that flashes white as it lands and rests as a neutral pill with a subtle top hairline. Full roving-tabindex keyboard support with arrow keys, Home/End, and correct tablist/tab/tabpanel roles.

motionfree

Installation

CLI

npx shadcn@latest add @crucible/detent

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
itemsDetentItem[]Tabs to render, in order.
valuestringControlled active tab value.
defaultValuestringfirst enabled itemInitial active tab value when uncontrolled.
onValueChange(value: string) => voidFires whenever the active tab changes, controlled or not.
orientation"horizontal" | "vertical""horizontal"Tab list orientation.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"div">, "onChange">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.