Skip to content
Data displayGenerated from the public API

List

A sequence of comparable rows on one hairline grid, with the slots that keep ten rows aligned.

@luc/ui

Examples

Default

A real list, not a column of cards: one hairline between rows, and the same five slots on every row so the eye can run down the column.

  • Momentum, 90 days

    12 symbols · annualised 14.2%

    2m agoPassed
  • Mean reversion, 30 days

    8 symbols · annualised 6.1%

    1h agoRunning
  • Carry, 180 days

    Provider returned 503 for the last session

    YesterdayFailed

Edges and a count

The header and footer are the list's own edges — a title with the one action it is about, and the count that says whether to keep reading.

Recent runs

Last 24 hours

Live
  • Run 128

    09:14
  • Run 127

    08:52
Showing 2 of 1,284

Bare rows

Without `bordered` the list is just the rows, which is what a panel or a sidebar wants.

  • BTCUSDT

    1h · 1,284 bars

    0.4%
  • ETHUSDT

    1h · 1,284 bars

    −0.2%

Usage

import { List } from "@luc/ui";
<List bordered divided aria-label="Recent backtests">
  <ListItem title="Momentum, 90 days" description="12 symbols" meta="2m ago" />
</List>

Package setup — peer requirements, the stylesheet and the provider — is on installation.

API

Read from the published TypeScript API, so a prop that is not listed here does not exist and a default that is listed is the one the compiler sees.

Exported symbols
ExportKindSignature
List2 documented props({ className, divided, bordered, ...props }: ListProps) => import("@types/react").JSX.Element
ListFooterexport({ className, ...props }: ListFooterProps) => import("@types/react").JSX.Element
ListHeader3 documented props({ className, title, description, actions, ...props }: ListHeaderProps) => import("@types/react").JSX.Element
ListItem5 documented props({ className, leading, title, description, meta, trailing, children, ...props }: ListItemProps) => import("@types/react").JSX.Element

List props

Type: ListProps

Values the compiler reads from the declaration.

List props
PropTypeDefaultNotes
bordered?boolean | undefined—A border and a radius around the whole list, for a standalone surface.
divided?boolean | undefined—One hairline between rows, and none before the first.

ListHeader props

Type: ListHeaderProps

Values the compiler reads from the declaration.

ListHeader props
PropTypeDefaultNotes
actions?ReactNode—The one action this list is about — a "New run", a "View all".
description?ReactNode—
titleReactNode—

ListItem props

Type: ListItemProps

Values the compiler reads from the declaration.

ListItem props
PropTypeDefaultNotes
description?ReactNode—One line of what the row is. Wraps, but is not a paragraph.
leading?ReactNode—A mark, an avatar, an ordinal — anything that identifies the row at a glance.
meta?ReactNode—Right-aligned secondary value: a timestamp, a count, a change.
titleReactNode—
trailing?ReactNode—Controls at the end of the row — a badge, a button, a menu.

Guidelines

Do

  • Use `ListItem`'s `leading`, `trailing` and `meta` slots rather than hand-building a row; the alignment and the truncation come with them.
  • Keep `title` to the row's identity and move the detail into `description`, which is allowed to wrap.

Don't

  • Put actions inside the title: a control inside a row that is itself a link gives the reader two nested targets.

Accessibility

The shell is a `ul` and each row a `li`, so the list is announced with its length. A row that acts is a real link or button rather than a div with a click handler.

Family

Data display

Dense, sortable, scannable: the surfaces a real product reads numbers from.

17 documented entries in this family. Open the family index

Luc UI v1.0Listdark theme