Skip to Content
MavKitOne is in beta. @mav-labs-inc/mavkit-react is not public packages yet.

List

A pure CSS grouped-list container — no JS behavior. Renders a <ul role="list">; compose rows inside with ListItem/ListText. ListItem wraps only .list-item (the <li>) — the row itself (.list-row, icon/avatar, trailing value/chevron) is hand-written markup, since a <div>/<button>/<a> row needs that element’s own native semantics.

Usage

import { List, ListItem, ListText } from '@mav-labs-inc/mavkit-react' <List aria-label="General settings"> <ListItem> <div className="list-row"> <div className="list-body"><ListText>Wi-Fi</ListText></div> <span className="list-value">Scope Office</span> </div> </ListItem> </List>

Examples

Basic

Set hasIcon/hasAvatar on List to match whichever leading slot the rows use — it sizes the separator inset.

  • Wi-Fi
    Scope Office
  • Bluetooth
    On
  • Airplane Mode

Multiline rows

  • Jamie DoeRe: Q3 roadmap reviewThanks for putting this together — a few thoughts on the timeline before Thursday's sync.

Props

List

Renders a <ul role="list"> and accepts every native <ul> attribute in addition to the props below.

PropTypeDefaultDescription
hasIconboolean—Reserves separator inset for a leading .list-icon slot (32px).
hasAvatarboolean—Reserves separator inset for a leading .list-avatar slot (40px).
multilineboolean—Taller rows for title + subtitle + note (email/feed style).
navboolean—Rows are always interactive; pairs with <a class="list-row"> links.

ListItem

PropTypeDefaultDescription
disabledboolean—Dims the row and removes it from interaction via data-disabled + aria-disabled. The nested .list-row element needs its own disabled/aria-disabled too.

Also accepts every native <li> attribute.

ListText

PropTypeDefaultDescription
variant'title' | 'subtitle' | 'note''title'
clamp2 | 3—Clamp a variant="note" preview to 2 or 3 lines. Ignored for other variants.

Also accepts every native <span> attribute.

Styling a custom element as a list

import { listClasses } from '@mav-labs-inc/mavkit-react' <ol className={listClasses({ hasIcon: true })}>…</ol>
Last updated on