Item
Generic list item component with active/disabled states and leading/trailing slots.
Usage
tsx
1import { Item } from '@storm-ds/ui'2import { HomeIcon } from '@storm-ds/icons'34<Item5 leading={<HomeIcon className="w-5 h-5" />}6 active7>8 Home9</Item>Basic
Simple item
Another item
Disabled item
tsx
1<Item>Item text</Item>2<Item active>Active item</Item>3<Item disabled>Disabled item</Item>With Icons
document.pdf12 KB
Photos3 items
tsx
1<Item leading={<HomeIcon className="w-5 h-5" />}>2 Home3</Item>4<Item leading={<SettingsIcon className="w-5 h-5" />} trailing={<ChevronRightIcon className="w-5 h-5" />}>5 Settings6</Item>Active State
Dashboard
Profile
Settings
tsx
1<Item active leading={<HomeIcon className="w-5 h-5" />}>2 Current Page3</Item>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| active | boolean | false | Highlights item as selected |
| disabled | boolean | false | Disables interactions |
| leading | React.ReactNode | - | Icon or element before text |
| trailing | React.ReactNode | - | Icon or element after text |
| children | React.ReactNode | - | Item text content |
| className | string | - | Custom classes |
Use with AI
Create a Next.js component using Storm UI's Item for generic list items. Import: `import { Item } from '@storm-ds/ui'`. Props: active (boolean for highlighting), disabled (boolean), leading (icon/element), trailing (icon/element), children (text), className. Perfect for navigation lists, sidebars, dropdowns. Leading for icons before text, trailing for chevrons or badges. Active state shows highlight. Disabled state shows reduced opacity. Server component compatible. Example: `<Item active>Current</Item>`, `<Item leading={<HomeIcon />}>Home</Item>`, `<Item leading={<SettingsIcon />} trailing={<ChevronIcon />}>Settings</Item>`