Item
Data displayPresents a compact content row with a title, supporting description, and optional trailing metadata.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/item.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Include the complete example
This example also composes icon, typography. Install its parts together:
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/icon.json https://luv-jeri.github.io/cojeev-ui/r/item.json https://luv-jeri.github.io/cojeev-ui/r/typography.jsonUsing item
Compose ItemContent, ItemTitle, ItemDescription, and ItemTrailing for a readable list row.
Use the default button element for an action or choose an appropriate element through as for other content.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
ItemProps
| Prop | Type | Required |
|---|---|---|
variant | "flat" | "default" | "selected" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
ItemGroupProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | "grouped" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
ItemContentProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
ItemTitleProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
ItemDescriptionProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
ItemTrailingProps
| Prop | Type | Required |
|---|---|---|
variant | "default" | "pink" | "yellow" | "blue" | "olive" | null | undefined | No |
size | "default" | null | undefined | No |
as | React.ElementType | No |
Accessibility
Keep each actionable row clearly named and avoid nesting interactive controls inside the default button.
Expose any selection meaning with appropriate semantics in addition to the selected visual variant.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.