Skip to content
satin

List

Rows of people, files or settings, each with a title, meta and actions.

Installation

Terminal
npm i @uisatin/ui
Import
import { 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.

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.

PropTypeDefault
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.