Interactive
Pin List
Interactive list component with pin/unpin functionality and smooth layout animations. Perfect for React applications requiring organized content management with Next.js integration and TypeScript support.
Powered by
Installation
npx shadcn@latest add https://www.shadcn.io/registry/pin-list.json
npx shadcn@latest add https://www.shadcn.io/registry/pin-list.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/pin-list.json
bunx shadcn@latest add https://www.shadcn.io/registry/pin-list.json
Features
- Pin/unpin functionality with smooth layout transitions using Motion's LayoutGroup
- Automatic sectioning separating pinned and unpinned items with customizable labels
- Interactive animations with hover states and z-index management for clean transitions
- Flexible item structure supporting icons, names, descriptions, and custom metadata
- TypeScript support with complete interface definitions for items and configuration
- shadcn/ui compatibility using utility classes and consistent design patterns
Use Cases
This free open source React component works well for:
- Task management - To-do lists with priority pinning built with Next.js
- Bookmark organization - Favorite items and general collections using TypeScript and Tailwind CSS
- Dashboard widgets - Customizable panels with user-defined importance levels
- Content management - Articles, documents, or media with pinning capabilities
API Reference
PinList
Prop | Type | Default | Description |
---|---|---|---|
items | PinListItem[] | required | Array of items to display with pin states |
labels | {pinned?: string, unpinned?: string} | {pinned: "Pinned Items", unpinned: "All Items"} | Section labels for pinned and unpinned groups |
transition | Transition | {stiffness: 320, damping: 20, mass: 0.8, type: "spring"} | Motion transition configuration |
labelMotionProps | HTMLMotionProps<'p'> | {initial: {opacity: 0}, animate: {opacity: 1}, ...} | Animation props for section labels |
zIndexResetDelay | number | 500 | Delay before resetting z-index after animations |
className | string | - | Additional CSS classes for the container |
labelClassName | string | - | CSS classes for section labels |
pinnedSectionClassName | string | - | CSS classes for pinned items section |
unpinnedSectionClassName | string | - | CSS classes for unpinned items section |
PinListItem
Property | Type | Description |
---|---|---|
id | number | Unique identifier for the item |
name | string | Display name or title |
info | string | Secondary information or description |
icon | React.ElementType | Lucide React icon component |
pinned | boolean | Current pin state of the item |
Implementation Notes
- Uses Motion's LayoutGroup for seamless item transitions between sections
- Automatic state management with click handlers for pin toggling
- Z-index coordination prevents animation conflicts during transitions
- AnimatePresence handles section label appearance/disappearance
- Items automatically reorder when pin state changes
- Compatible with shadcn/ui theming and responsive layouts
Particles
Interactive particle animation component for React and Next.js applications. Built with TypeScript support, HTML5 Canvas, and Tailwind CSS styling featuring mouse interaction, customizable behavior, and performance optimization.
Rating
Interactive star rating component for React and Next.js applications. Built with TypeScript support, Tailwind CSS styling, and shadcn/ui design featuring keyboard navigation, hover effects, and form integration.