kai-empty
A centred empty-state block with a media slot, a title, a description, and a content slot for actions — keeps layouts grounded instead of leaving users with a blank screen.
- Shadow DOM
- 2 props
- Media slot
- Actions slot
- Works in any framework
Preview
Section titled “Preview”<kai-empty empty-title="No conversations yet" description="Start a new chat to see it appear here."> <svg slot="media" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" /> </svg> <button>New chat</button></kai-empty>empty-title— use this attribute, nottitle(which is a reserved HTML attribute).- Slots live in the light DOM — style them with your page CSS, not shadow styles.
- Height — the element uses flexbox to vertically centre content; its parent needs an explicit height (e.g.
height: 100%orflex: 1).
Examples
Section titled “Examples”Conversation List Placeholder
Section titled “Conversation List Placeholder”Search with No Results
Section titled “Search with No Results”Title Only
Section titled “Title Only”Omitting the description gives a minimal, uncluttered treatment.
| Slot | Mode | Purpose |
|---|---|---|
| (default) | inject | The empty-state body below the title/description, usually the call to action. |
| media | replace | The leading illustration or icon above the title (any inline SVG or <img>). Replaces the built-in media box. |
| Property | Type | Default | Notes |
|---|---|---|---|
| theme | "light" | "dark" | "auto" | 'auto' | Color mode (`auto` follows prefers-color-scheme). |
| emptyTitle | string | '' | Title text. Attribute: `empty-title` (`title` is a global HTML attribute). |
| description | string | '' | Description text. |
Composed from
Section titled “Composed from”This element wraps these SolidJS components — reach for them directly when you need finer control than the props expose.
EmptyEmptyHeaderEmptyMediaEmptyTitleEmptyDescriptionEmptyContent