Skip to content

List

Semantic ordered, unordered, and description lists with token-driven spacing, marker style, and marker colour.

  • stable
  • since v0.1.0
  • 4.11 kB
  • typography
  • structure

Renders native <ul>, <ol>, or <dl> with their matching item elements so assistive tech announces list length, position, and term/details pairings.

Preview
Open
tsx

OrderedList renders a <ol> and defaults to a decimal marker. It accepts the native start, reversed, and type props so numbered procedures stay flexible.

Preview
Open
tsx

marker accepts disc, circle, square, none for unordered lists and decimal, lower-alpha, upper-alpha for ordered lists. Use markerColor to tint the bullet from any colour token.

Preview
Open
tsx

spacing accepts any space token and controls the gap between items. The default is 2 — bump it up for breathing room in long lists.

Preview
Open
tsx

Nest a List (or OrderedList) inside a ListItem to express sub-points; spacing and markers can differ per level.

Preview
Open
tsx

DescriptionList pairs DescriptionTerm with DescriptionDetails for key-value content such as glossaries and metadata tables.

Preview
Open
tsx
PropTypeDefaultDescription
spacing
"2"
Vertical gap between list items, from the spacing scale.
marker
Responsive<ListMarker>
`list-style-type`. `List` defaults to `disc`; `OrderedList` defaults to `decimal`. Use `none` to hide markers entirely.
markerColor
"bg.canvas"|"bg.surface"|"bg.subtle"|"bg.muted"|"bg.raised"|"bg.overlay"|"bg.inverse"|"fg.subtle"|"fg.muted"|"fg.inverse"|"fg.default"|"fg.disabled"|"fg.onAccent"|"border.subtle"|"border.default"|"border.disabled"|"border.strong"|"border.focus"|"accent.solid"|"accent.solidHover"|"accent.solidActive"|"accent.soft"|"accent.softHover"|"accent.softActive"|"accent.ring"|"accent.onSolid"|"feedback.success.foreground"|"feedback.success.border"|"feedback.success.solid"|"feedback.success.soft"|"feedback.success.onSolid"|"feedback.danger.foreground"|"feedback.danger.border"|"feedback.danger.solid"|"feedback.danger.soft"|"feedback.danger.onSolid"|"feedback.warning.foreground"|"feedback.warning.border"|"feedback.warning.solid"|"feedback.warning.soft"|"feedback.warning.onSolid"|"feedback.info.foreground"|"feedback.info.border"|"feedback.info.solid"|"feedback.info.soft"|"feedback.info.onSolid"
Colour for the marker glyph (`::marker`). Independent of text colour.
className
string
Additional class names appended after Cynosure's base classes.
style
CSSProperties
Inline style overrides merged last.
children
ReactNode
List items.
padding
Padding on all four sides. Token from the spacing scale.
paddingX
Horizontal padding (left + right). Overrides `padding` on the X axis.
paddingY
Vertical padding (top + bottom). Overrides `padding` on the Y axis.
paddingTop
Padding on the top edge. Beats `padding` / `paddingY`.
paddingRight
Padding on the right (inline-end in RTL) edge.
paddingBottom
Padding on the bottom edge.
paddingLeft
Padding on the left (inline-start in RTL) edge.
margin
Margin on all four sides. Accepts the spacing scale or `"auto"`.
marginX
Horizontal margin (left + right). Use `"auto"` to centre.
marginY
Vertical margin (top + bottom).
marginTop
Margin on the top edge.
marginRight
Margin on the right edge.
marginBottom
Margin on the bottom edge.
marginLeft
Margin on the left edge.
width
Element width. Accepts a `SpaceToken`, `LengthValue`, or named alias.
height
Element height. Accepts a `SpaceToken`, `LengthValue`, or named alias.
minWidth
Minimum width — useful for preventing flex children from collapsing.
maxWidth
Maximum width — `"prose"` caps to a comfortable reading measure.
minHeight
Minimum height.
maxHeight
Maximum height.
background
Background colour. Use a `ColorToken` like `"bg.surface"` for theme awareness.
color
Text colour. Inherits unless set.
borderColor
Border colour. Pair with `borderWidth` to make the border visible.
borderWidth
Border thickness in scale steps.
borderStyle
Border line style.
borderRadius
Corner rounding token.
boxShadow
Drop-shadow token from the elevation scale.
opacity
Responsive<number | `${number}`>
Opacity 0–1. Use sparingly — prefer surface tokens over translucency.
overflow
How content that exceeds the box is handled.
overflowX
Horizontal-axis overflow control. Overrides `overflow` for the X axis.
overflowY
Vertical-axis overflow control.
display
CSS `display` value. `"contents"` removes the element's box from layout.
position
CSS `position`. Pair with `top`/`right`/`bottom`/`left` for placement.
top
Top inset (when positioned). Accepts a `SpaceToken`, `"auto"`, `"0"`, or `LengthValue`.
right
Right inset (when positioned).
bottom
Bottom inset (when positioned).
left
Left inset (when positioned).
zIndex
Stacking-context layer token (`"modal"`, `"tooltip"`, …).
gridColumn
Responsive<string>
Grid-column shorthand (e.g. `"1 / 3"`, `"span 2"`).
gridRow
Responsive<string>
Grid-row shorthand.
gridArea
Responsive<string>
Named grid area.
flex
Responsive<"1" | "none" | "auto" | "initial" | (string & {})>
Shorthand: `1 | auto | none | initial | <css>`. Resolves to `flex` on the child.
flexGrow
Responsive<number | `${number}`>
Grow factor inside a flex container.
flexShrink
Responsive<number | `${number}`>
Shrink factor inside a flex container.
flexBasis
Responsive<"content" | SizeValue>
Initial main-axis size before grow/shrink.
alignSelf
Override `align-items` for a single child.
justifySelf
Override `justify-items` for a single child (grid).
order
Responsive<number | `${number}`>
Flex/grid child reorder index.
asChild
boolean
When `true`, renders the primitive's single React child via `Slot`, forwarding className/style/ref/event handlers onto it.
  • List always renders as <ul> and OrderedList as <ol> so screen readers announce the list length and item position; DescriptionList renders <dl> to communicate term/details pairings.
  • Use OrderedList whenever sequence matters — assistive tech announces position information that an unordered list does not.
  • Avoid mixing non-ListItem children inside List / OrderedList; the semantic structure relies on <li> children to stay intact.
  • Setting marker="none" hides the visual bullet but preserves list semantics, so an unordered visual layout still reads as a list to screen readers.
  • Don’t pass as to list components — they are bound to their semantic element and warn in development if you try.
  • Use OrderedList for procedural content like setup steps and checklists.
  • For key-value pairs, reach for DescriptionList with DescriptionTerm and DescriptionDetails rather than a two-column table.
  • Keep ListItem content concise; nest a List inside a ListItem when sub-points are needed.
  • Set markerColor to an accent token to tint bullets without changing the body colour.