Skip to content

Item

A list row with media, title, description and actions.

Variants

Default
Outline
Muted

Sizes

Default
Small
Extra small

With media and actions

Invoice INV-0412
Website refresh

Group

Export invoices as PDF
Done
Remember the sort order of task lists
In review
Open the project switcher faster
In progress
Release 4.2Shipped
Export invoices as PDF
Billing12 November

Installation

npx shadcn@latest add @khaeli/item

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

npm packages
  • @base-ui/react ^1.7.0
  • class-variance-authority ^0.7.1

Keyboard

Tab
Moves to an item rendered as a link, and to the buttons in ItemActions. A plain item takes no focus.
Enter
Follows an item rendered as a link.

Accessible name

  • An item rendered as a link with render is named by everything inside it: keep the title first and the description short.
  • ItemGroup is a plain div. For a list, pass role="list", wrap each row in an element with role="listitem" and keep ItemSeparator inside the wrapper.
  • Icons and images in ItemMedia are decoration beside a title: give an image alt="".

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/item.json