List
A vertical list of items with a title, an optional description and leading or trailing content, in plain, card and modern styles.
- RAContestação · Banco Aurora
Enviada hoje às 09:40
Em revisão - CRPetição inicial · Seguradora Norte
Enviada ontem às 17:15
Concluída
When to use
- For a short collection where each item has a title and one line of detail: tarefas, documentos, revisores.
- When each row carries an avatar, an icon or a status next to the text.
- For bulleted or numbered text, such as the steps of a task.
When not to use
- Many records with the same columns. Use Table.
- Label and value pairs about one record. Use Data list.
- Nested structures. Use Tree view.
- Choosing options. Use a Radio group, a Checkbox or a Select.
Variants
- Revisar contestação
Processo 0001234-56.2026.8.26.0100 · Banco Aurora
- Conferir petição inicial
Processo 0004321-98.2026.8.26.0100 · Seguradora Norte
- Anexar procuração
Processo 0007788-10.2026.8.26.0100 · Varejo Sul
- Revisar contestação
Processo 0001234-56.2026.8.26.0100 · Banco Aurora
- Conferir petição inicial
Processo 0004321-98.2026.8.26.0100 · Seguradora Norte
- Anexar procuração
Processo 0007788-10.2026.8.26.0100 · Varejo Sul
| Variant | Use for |
|---|---|
plain |
Default. Rows with a bottom border, no container. |
card |
A bordered container. Add divided for lines between items. |
modern |
Draggable-looking rows with a border and shadow, for reordering. |
modernSecondary |
Same as modern, with a secondary border and no shadow. |
List passes its variant to each ListItem it receives directly. Do not wrap the items in a component of your own, or they fall back to plain.
Sizes
size on ListItem sets the vertical padding: sm, md (default) and lg.
- Tamanho sm
- Tamanho md
- Tamanho lg
Examples
Leading and trailing content
Use leading for an avatar or icon and trailing for a status or an arrow. Add aria-hidden to decorative icons.
- RAContestação · Banco Aurora
Enviada hoje às 09:40
Em revisão - CRPetição inicial · Seguradora Norte
Enviada ontem às 17:15
Concluída
Bullets and numbers
Set bullets to disc for unordered items. Use ordered with bullets="decimal" when the sequence matters.
- Número do processo
- Nome do cliente
- Documentos anexados
- Conferir os dados da petição inicial
- Anexar a procuração
- Enviar para revisão
Interactive items
interactive only adds a pointer cursor. The item is not focusable and has no role. Put a button or a link inside it, as the content, to make the row actionable.
- Contestação · Banco Aurora
- Recurso · Varejo Sul
Content
- The title is the name of the item: “Revisar contestação”. The description gives the context: “Processo 0001234-56.2026.8.26.0100 · Banco Aurora”.
- Descriptions are cut on one line. Keep the key information at the start.
- Keep the same kind of content in every item of a list.
Accessibility
- Renders a native
ul, or anolwithordered, so assistive technology announces the number of items and the position. - Use
orderedwhen the sequence matters and the defaultulotherwise. - Decorative icons in
leadingandtrailingneedaria-hidden. interactivedoes not add a role, keyboard support or a focus style. Use a real button or link as the content of the item.- Do not rely on color alone to tell the state of an item. Use a Tag with text.
Code
import { List, ListItem } from "@repo/ui/list";
<List divided variant="card">
<ListItem description="Processo 0001234-56.2026.8.26.0100 · Banco Aurora">
Revisar contestação
</ListItem>
<ListItem description="Processo 0004321-98.2026.8.26.0100 · Seguradora Norte">
Conferir petição inicial
</ListItem>
</List>;
Props
List| Prop | Type | Default | Description |
|---|---|---|---|
bullets | "decimal" | "disc" | "none" | none | Marker shown before each item |
divided | boolean | false | Adds dividers between items. Only the card variant uses it |
ordered | boolean | false | Renders an ordered list (`ol`) instead of `ul` |
variant | "card" | "modern" | "modernSecondary" | "plain" | plain | Visual style of the list and its items |
ListItem| Prop | Type | Default | Description |
|---|---|---|---|
variant | "plain" | "card" | "cardSecondary" | "modern" | "modernSecondary" | inherited from List | Style of the item. Normally inherited from the parent List. |
size | "sm" | "md" | "lg" | "md" | Vertical padding. |
interactive | boolean | false | Adds a pointer cursor. Adds no role, keyboard support or focus style. |
leading | ReactNode | — | Content before the text, such as an avatar or an icon. |
trailing | ReactNode | — | Content after the text, such as a status or an arrow. |
description | ReactNode | — | One line of detail under the title. It is truncated. |
Known issues
| Issue | Effect |
|---|---|
card uses border-gray-200, divide-gray-200 and hover:bg-gray-50. These gray-scale values are defined only in :root. |
In Dark and Darker the borders, dividers and hover stay light gray, instead of following the theme. |
card items have border-b and the list adds divide-y when divided is set. |
Two lines can show between items. |
The card item sets hover:bg-disabled and hover:bg-gray-50 together. |
Two hover fills compete. The result depends on class order. |
ListItem text uses font-semibold text-sm and text-xs directly instead of Typography. |
The text does not follow the type scale. |
interactive only sets cursor-pointer. |
The row looks clickable but is not focusable, has no role and no focus style. |
ListItem accepts cardSecondary, but List does not offer it. |
The item variant cannot be inherited from the list. It must be set on every item. |
List only passes the variant to direct ListItem children (it reads child.type). |
Items inside a wrapper component, or a fragment, silently render as plain. |