Item
Shows one thing in a list as a row: its name, a line about it, and a time or an action at the end.
Examples
Aleksandra Wiśniewska
Oct 24 to Oct 27
BK-4821
Jo Park
Oct 25 to Oct 26
BK-4822
Tomás Okafor
Nov 2 to Nov 9
BK-4830
- Room
- Double, garden side
- Total
- $477.00
Email me about
Variants
Usage
Use it when
- A list of things a person scans by name: search results, members, recent bookings, followed funds.
- A list of settings, each with a switch or a button at its end.
- A list of things on days a person plans around, such as bookings, events or deadlines, with a
DateTileinItemMediaso the eye finds a day.
Use something else when
- The things share several columns of figures a person compares. Use Table instead, or DataTable past 50 rows.
- The list is a menu of commands that opens from a button. Use DropdownMenu instead.
- The list is facts about one thing. Use DataList instead.
- A date sits in a table cell or a sentence. Use the
date()formatter fromregistry/cobalt/lib/format.tsinstead of a DateTile, and RelativeTime for a time relative to now.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/item.json https://kaanarici.com/r/cobalt/date-tile.jsonimport { ItemGroup, Item, ItemMedia, ItemIcon, ItemContent, ItemTitle, ItemDescription, ItemActions } from "@/components/cobalt/ui/item"import { DateTile } from "@/components/cobalt/ui/date-tile"

