Skip to content

Empty

Explain an empty state and offer one clear next action. CSS only

Empty
Copy this markup
<section class="ui-empty" aria-labelledby="empty-projects-title">
<div data-ui-part="art" aria-hidden="true"></div>
<h2 id="empty-projects-title">No projects yet</h2>
<p>Create a project to start composing your interface.</p>
<div data-ui-part="actions">
<button class="ui-button" data-ui-variant="secondary" type="button">Create project</button>
</div>
</section>

Install

Styles and registration
import '@timelessui/components/css/tokens.css'
import '@timelessui/components/css/button.css'
import '@timelessui/components/css/empty.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
artNo[data-ui-part~='art']Decorative illustration or icon.
actionsNo[data-ui-part~='actions']Container for the one clear next action.

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-densitycompact · normal · spaciousnormalVertical rhythm of the empty state.

Styling

Root identity: ui-empty. Required stylesheets: tokens.css, button.css, empty.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 (25)

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

--ui-accent · --ui-bg-accent · --ui-bg-accent-active · --ui-bg-accent-hover · --ui-bg-control · --ui-bg-control-active · --ui-bg-control-hover · --ui-bg-control-muted · --ui-bg-danger · --ui-bg-danger-active · --ui-bg-danger-hover · --ui-duration-fast · --ui-ease-standard · --ui-fg · --ui-fg-muted · --ui-focus · --ui-radius-control · --ui-shadow-control-accent · --ui-shadow-control-active · --ui-shadow-control-danger · --ui-shadow-outline-control · --ui-space-2 · --ui-space-3 · --ui-space-4 · --ui-space-5

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 Empty in StoryLite for variants, controls, and manual testing.