Pin List

A playful list for pinning and unpinning items, with smooth animated transitions as items move between groups.

Loading...

Installation

pnpm dlx shadcn-ui@latest add "https://narakcode.vercel.app/r/pin-list.json"

Usage

<PinList items={ITEMS} />

Props

PropTypeDefaultDescription
itemsPinListItem[](required)The array of items to display in the list.
classNamestring""Additional CSS classes for the root component element.
labelClassNamestring""Additional CSS classes for the section labels.
pinnedSectionClassNamestring""Additional CSS classes for the wrapper of the pinned items.
unpinnedSectionClassNamestring""Additional CSS classes for the wrapper of the unpinned items.
labels{ pinned?: string; unpinned?: string; }{ pinned: "Pinned", ... }Custom text for the pinned and unpinned section labels.
transitionTransition{ type: "spring", ... }Framer Motion transition object for item layout animations.
labelMotionPropsHTMLMotionProps<"p">{ initial: ..., ... }Framer Motion props for the section label animations.
zIndexResetDelaynumber500Delay in ms to reset z-index after an animation.