Item
Flexible list row with media, content, actions, header, and footer slots.
pnpm dlx @glinui/cli@latest add itemName, avatar and public bio.
Weekly digest and mentions.
Follows your system by default.
API tokens, webhooks and data export.
Installation
pnpm dlx @glinui/cli@latest add itemPrefer the package?
Usage
Variants
Every vocabulary variant on the default tone. Omit variant to follow the ambient design style.
Item description
Item description
Item description
Item description
Item description
Item description
Item description
import { Item, ItemContent, ItemDescription, ItemTitle } from "@glinui/ui"
export function ItemVariantsDemo() { return ( <div className="grid gap-3 md:grid-cols-2"> <Item variant="glinr"><ItemContent><ItemTitle>glinr</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="solid"><ItemContent><ItemTitle>solid</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="plain"><ItemContent><ItemTitle>plain</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="soft"><ItemContent><ItemTitle>soft</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="outline"><ItemContent><ItemTitle>outline</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="ghost"><ItemContent><ItemTitle>ghost</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> <Item variant="gradient"><ItemContent><ItemTitle>gradient</ItemTitle><ItemDescription>Item description</ItemDescription></ItemContent></Item> </div> )}Media list
Outline items with leading media, trailing actions and a soft warning item.
Mira Lowe
The Quiet Hours
Oskar Venn
Only downloaded tracks will play.
import { CaretDown, Warning } from "@phosphor-icons/react"import { Avatar, Button, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle} from "@glinui/ui"
export function Demo() { const tracks = [ { title: "Night Drive", artist: "Mira Lowe", length: "3:42", tone: "accent" as const }, { title: "Paper Lanterns", artist: "The Quiet Hours", length: "4:08", tone: "success" as const }, { title: "Low Tide", artist: "Oskar Venn", length: "2:56", tone: "info" as const } ] return ( <ItemGroup className="w-full max-w-lg gap-2"> {tracks.map((track) => ( <Item key={track.title} variant="outline" size="sm"> <ItemMedia> <Avatar radius="lg" fallback={track.title.slice(0, 2)} tone={track.tone} /> </ItemMedia> <ItemContent> <ItemTitle>{track.title}</ItemTitle> <ItemDescription>{track.artist}</ItemDescription> </ItemContent> <ItemActions> <span className="text-xs tabular-nums text-[var(--color-muted)]">{track.length}</span> <Button variant="ghost" size="sm" aria-label={`More options for ${track.title}`}> <CaretDown aria-hidden className="size-4" /> </Button> </ItemActions> </Item> ))} <Item variant="soft" tone="warning" size="sm"> <ItemMedia variant="icon"><Warning aria-hidden /></ItemMedia> <ItemContent> <ItemTitle>Offline mode is on</ItemTitle> <ItemDescription>Only downloaded tracks will play.</ItemDescription> </ItemContent> </Item> </ItemGroup> )}Accessibility
- Items are neutral containers. Use `asChild` with an anchor or button for interactive rows.
- Interactive items show a violet focus ring.
- ItemSeparator exposes `role="separator"`.
Keyboard Interactions
| Key | Action |
|---|---|
| Tab | Moves focus through interactive items and actions. |
| Enter | Activates a link item. |
Reduced Motion
Hover and border transitions are removed with reduced motion.
Affected properties
background-colorborder-colorbox-shadowAPI Reference
Item
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "icon" | "image" | No | ambient (glinr) | Surface variant. Omit to follow the ambient design style (glinr by default, plain for minimal, glass for glass). |
tone | "neutral" | "accent" | "success" | "warning" | "danger" | "info" | - | neutral | Colour tone for the vocabulary variants. |
size | "default" | "sm" | - | default | Padding scale. |
asChild | boolean | - | false | Render as the child element, for example a link. |
ItemMedia
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "icon" | "image" | No | default | Icon tile or rounded image frame. |
ItemGroup / ItemSeparator / ItemHeader / ItemContent / ItemTitle / ItemDescription / ItemActions / ItemFooter
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
className | string | - | - | Merged onto each slot. |
variant | "default" | "icon" | "image" | No | "default" | Variant option from itemMediaVariants. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { Item } from "@glinui/ui"Source Files
Dependencies
@glinui/ui@radix-ui/react-slotclass-variance-authorityGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/item.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
ItemProps
ItemMediaProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "icon" | "image" | No | "default" | Variant option from itemMediaVariants. |
ItemProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
asChild | boolean | No | false | Render as the child element (e.g. a link) instead of a div. |
size | "default" | "sm" | No | - | - |
tone | SurfaceTone | No | - | - |
variant | SurfaceVariant | "muted" | "default" | "raised" | "frosted" | No | - | Visual variant. Omit for the ambient design style (glinr: lift shell; plain: shadcn bordered row). Vocabulary: glinr, solid, plain, soft, outline, ghost, gradient, glass. `muted` is an alias of soft. |