Skip to content
Data & ChartsPro

List Item

One list row: an icon tile, avatar, logo, flag, checkbox or date tile on the left, title and description in the middle, a value, badge, trend, button, switch or menu on the right. Comfortable or compact, with default, hover, selected and disabled states.

See alsoList GroupProList PanelPro

Usage

  • alina@wunderui.com
    $1,240.00Today
  • felix@wunderui.com
    $860.00Yesterday
  • mara@wunderui.com
    $420.00Oct 19

Installation

List Item comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import {
  ListItem,
  CoinLogo,
  CoinMark,
  IntegrationLogo,
  IntegrationMark,
  ListFlag,
  ListItemData,
  ListItemLeading,
  ListItemLeadingProps,
  ListItemProps,
  ListItems,
  ListItemsProps,
  ListItemTrailing,
  ListItemTrailingProps,
} from "@wunderui/react"

Examples

List Item: comfortable, all states

Default, hover, selected and disabled at the comfortable density (12 px padding). The first row selects on click.

  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today

List Item: compact, all states

The same four states at the compact density: 8 px above and below, 12 px at the sides.

  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today
  • alina@wunderui.com
    $1,240.00Today

Integration Logo: 30 integrations

The product marks inside the plain 36 px Icon Button frame, drawn at 20 px. The one-colour marks (OpenAI, GitHub, Linear, Mailchimp, Intercom, Zendesk) follow text-primary and turn white in dark mode.

Coin Logo: 30 coins

The 30 most popular coins as round brand marks at 20 px in the same 36 px plain frame, for the coin slot of crypto lists (leading: { type: "coin", coin: "btc" }). Decorative: the coin's name stays in the row text.

  • BTC
  • ETH
  • USDT
  • BNB
  • SOL
  • USDC
  • XRP
  • DOGE
  • TON
  • ADA
  • TRX
  • AVAX
  • SHIB
  • LINK
  • DOT
  • BCH
  • LTC
  • NEAR
  • POL
  • UNI
  • ICP
  • XLM
  • ETC
  • XMR
  • ATOM
  • APT
  • ARB
  • OP
  • AAVE
  • DAI

Anatomy

The parts the component is made of. Each one renders a you can target from CSS.

  • data-slot="list-items"Optional

    The list itself (). Sets density, dividers and the timeline connector for its rows, and renders data.

  • data-slot="list-item"

    One row: the leading slot, the title with its description and meta line, and the trailing slot. With or the title becomes the row's single button or link, stretched over the row.

  • data-slot="list-item-leading"Optional

    The left slot, drawn from a spec: icon tile, avatar, logo, checkbox, drag handle, date tile, icon, rank, step, flag or coin. A React node passes through.

  • data-slot="integration-logo"Optional

    A product mark (Figma, Slack, Stripe … 30 in all) at 20 px inside the plain 36 px icon-button frame. Used by the leading slot; an image, not a control.

  • data-slot="integration-mark"Optional

    The bare 20 × 20 product mark, for your own buttons or chips.

  • data-slot="list-flag"Optional

    A round country flag for the leading slot (Audience by Location).

  • data-slot="coin-logo"Optional

    A round coin mark (Bitcoin, Ethereum, Solana … 30 in all) at 20 px inside the plain 36 px icon-button frame, for the leading slot. Decorative: the coin name stays in the row text.

  • data-slot="coin-mark"Optional

    The bare round coin mark, for your own chips, tables and pickers.

  • data-slot="list-item-trailing"Optional

    The right slot, drawn from a spec: value, value with badge or trend, trend, progress, button, switch, icon button with menu, chevron, shortcut, badge, avatars or time with unread dot.

  • data-slot="list-item-row"

    The 8 px rounded surface that takes the hover, selected and pressed states; 12 px padding (8 px above and below when compact).

  • data-slot="list-item-content"

    Title (14 medium), description (12, secondary) and meta line (12, tertiary).

Best practices

  • When to use

    Use a List Item for a row people scan and act on in one place: a person, a payment, an app, a setting. To compare many columns across rows, use a Table or Data Table.

  • Do

    Give the row one primary action through or . Buttons, switches and menus in the trailing slot stay separate tab stops.

  • Do

    Pick one leading type per list, so the titles line up and the eye can scan down one edge.

  • Do

    For crypto rows pass : the real mark is drawn and kept away from screen readers, because the coin name is already in the title.

  • Do

    Keep the trailing value short and tabular: an amount, a badge or a trend. Put the explanation in the description.

  • Don’t

    Don't put two buttons in the trailing slot; move secondary actions into the icon-button menu.

  • Don’t

    Don't use selected for hover or focus. It marks the chosen row, and the title turns link-coloured with it.

API Reference

PropTypeDefault
titleReactNode—
description / metaReactNode—
leading{ type: "icon-tile" | "avatar" | "logo" | "checkbox" | "drag-handle" | "date" | "icon" | "rank" | "step" | "flag" | "coin", … } | ReactNode—
trailing{ type: "value" | "value-badge" | "value-trend" | "trend" | "progress" | "button" | "switch" | "icon-button" | "chevron" | "shortcut" | "badge" | "avatars" | "meta", … } | ReactNode—
onSelect / href() => void / string— (static row)
selected / disabledbooleanfalse
tone"default" | "destructive""default"
density"comfortable" | "compact"from ListItems
dividerbooleanfrom ListItems (true)
state"default" | "hover" | "selected" | "disabled"— (derived)
ListItems items / density / divider / timelineListItemData[] / … / boolean / boolean— / "comfortable" / true / false
IntegrationLogo name / labelIntegrationName (30) / string— / the name · 36 px tile, mark 20 px
CoinLogo coin / label"btc" | "eth" | "usdt" | "bnb" | "sol" | "usdc" | "xrp" | "doge" | "ton" | "ada" | "trx" | "avax" | "shib" | "link" | "dot" | "bch" | "ltc" | "near" | "pol" | "uni" | "icp" | "xlm" | "etc" | "xmr" | "atom" | "apt" | "arb" | "op" | "aave" | "dai" / string— / decorative (aria-hidden) · 36 px tile, mark 20 px
ListFlag country / label"us" | "de" | "gb" | "in" | "br" | "fr" | "es" | "nl" | "jp" | "ca" / string— / decorative
childrenReact.ReactNode—
descriptionReact.ReactNode—
disabledboolean—
hrefstring—
metaReact.ReactNode—
onSelect() => void—
rowClassNamestring—
selectedboolean—
...propsReact.LiHTMLAttributes (278 attributes)—

Theming

The CSS variables this component reads. Set one on any wrapper to restyle everything inside it. More in Theming.

VariableUsed forDefault
Color
BackgroundListItem, ListItems#F1F5F7dark #323438
BackgroundListItem, ListItems, ListItemTrailing#555CF3
Backgroundhover · CoinLogo, IntegrationLogo#FFFFFFdark #1C1D20
Outline, textListItem, IntegrationLogo, IntegrationMark, ListItemLeading, ListItems, ListItemTrailing#000000dark #FFFFFF
Outlinefocus · ListItem, ListItems#555CF3dark #999DF8
Backgroundhover · ListItem, ListItemLeading, ListItems#F1F5F7dark #25272A
TextListItem, ListItems, ListItemTrailing#D42A2Ddark #F8ADBC
TextListItem, ListItemLeading, ListItems#555CF3dark #999DF8
TextListItem, ListItemLeading, ListItems, ListItemTrailing#454648dark #D1D1D1
TextListItem, ListItems, ListItemTrailing#0C7E5Adark #76E6C1
TextListItem, ListItemLeading, ListItems, ListItemTrailing#6E6E70dark #A2A3A3
BackgroundListItem, ListItemLeading, ListItems#F1F0F3dark #2C2C36
BackgroundListItem, ListItemLeading, ListItems#E7F7FEdark #074660
BackgroundListItem, ListItemLeading, ListItems#E8FBF5dark #0A553D
BackgroundListItem, ListItemLeading, ListItems#F4F5FFdark #222561
BackgroundListItem, ListItemLeading, ListItems#FEF0EDdark #61281E
BackgroundListItem, ListItemLeading, ListItems#FFF0F8dark #662B4A
BackgroundListItem, ListItemLeading, ListItems#F6F3FEdark #423561
BackgroundListItem, ListItemLeading, ListItems#FEF1F4dark #622F3A
TextListItem, ListItemLeading, ListItems#424150dark #C5C5CF
TextListItem, ListItemLeading, ListItems#0B6990dark #A0DFF9
TextListItem, ListItemLeading, ListItems#10805Bdark #A3EED6
TextListItem, ListItemLeading, ListItems#333792dark #BBBEFA
TextListItem, ListItemLeading, ListItems#923D2Cdark #FAC1B7
TextListItem, ListItemLeading, ListItems#984070dark #FFC4E3
TextListItem, ListItemLeading, ListItems#634F92dark #DBCEFA
TextListItem, ListItemLeading, ListItems#924756dark #FBC8D3
TextListItem, ListItemLeading, ListItems#64511Edark #FDEAB7
BackgroundListItem, ListItemLeading, ListItems#FFFAEDdark #64511E
Radius
Corner radiusListItem, ListItemLeading, ListItems8px
Motion
DurationListItem, ListItems, ListItemTrailing150ms
EasingListItem, ListItemscubic-bezier(0.22, 1, 0.36, 1)
EasingListItem, ListItems, ListItemTrailingcubic-bezier(0.4, 0, 1, 1)