List
Rows of people, files or settings, each with a title, meta and actions.
24 files
TodayEdited by Ada
2h ago1.2 MB
May 2
Installation
npm i @uisatin/uiimport { Item, List } from '@uisatin/ui/list'About 10.5 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/list.jsonAdds list.tsx to components/ui.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The List component is a ul of Items. An Item is one row: an icon or media, a title and description, meta and actions; with href or onClick the whole row is its target.
| Prop | Type | Default |
|---|---|---|
variant | "plain""divided""card" | "plain" |
size | "sm""md" | "md" |
Item.title | ReactNode | — |
Item.description | ReactNode | — |
Item.icon / media | ReactNode | — |
Item.meta / actions | ReactNode | — |
Item.href / onClick | string() => void | — |
Item.selected | boolean | false |
className | string | — |
ref | Ref<HTMLUListElement> | — |
...props | ComponentProps<'ul'>Other attributes go to <ul> | — |
Accessibility
A ul with role="list", so the list survives list-style: none; give it an aria-label when no heading names it. In an interactive row the title is the a or button, stretched over the row: one tab stop named by the title. A selected link has aria-current="page", a selected button aria-pressed. actions stay their own tab stops, and the icon tile is hidden.
Something wrong or missing on this page?
Report a problemSuggest an improvement