Skip to content

List

Structured lists with titles and descriptions. CSS only

List
Copy this markup
<ul class="ui-list">
<li data-ui-part="item">
<span data-ui-part="title">Install package CSS</span>
<span data-ui-part="description">Import tokens and only the components you use.</span>
</li>
<li data-ui-part="item">
<span data-ui-part="title">Author native markup</span>
<span data-ui-part="description">Keep behavior available when CSS is absent.</span>
</li>
<li data-ui-part="item">
<span data-ui-part="title">Style public anatomy</span>
<span data-ui-part="description">Use class hooks and namespaced data attributes.</span>
</li>
</ul>

Install

Styles and registration
import '@timelessui/components/css/tokens.css'
import '@timelessui/components/css/list.css'

Anatomy

Parts are authored in your own markup and identified by the selector below, so your CSS can target the same anatomy without loading Timeless styles. Required parts must be present for the component to work. Private data-ui-internal-* hooks are written by the runtime and must never be authored.

PartRequiredSelectorPurpose
itemNo[data-ui-part~='item']One row. Use <li>.
titleNo[data-ui-part~='title']Primary row text.
descriptionNo[data-ui-part~='description']Secondary row text.

Attributes

Every value below is implemented by the stylesheets this component ships. Boolean attributes are presence-based: author the attribute with no value, or omit it.

AttributeValuesDefaultDescription
data-ui-variantplain · divided · inset · orderedplainRow treatment. Use ordered together with an <ol> element, not instead of one.
data-ui-densitycompact · normalnormalRow padding.

Styling

Root identity: ui-list. Required stylesheets: tokens.css, list.css.

This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.

Design tokens this component reads (9)

These are global Atmosphere tokens. Change them once at the theme level rather than per component.

--ui-bg-surface · --ui-fg · --ui-fg-muted · --ui-line · --ui-radius-lg · --ui-radius-md · --ui-space-1 · --ui-space-2 · --ui-space-3

Accessibility

Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.

Before JavaScript runs

This primitive is CSS only. There is nothing to register and nothing to wait for.

More examples

Open List in StoryLite for variants, controls, and manual testing.