Empty StatePro
What a list or panel shows while it has nothing yet: an icon, a title, one line and a first step, framed, bare or inline, with starter prompts for agent apps.
oxyn add empty-stateThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- What a list or panel shows while it has nothing yet: an icon, a title, one line and a first step, framed, bare or inline, with starter prompts for agent apps.
When not to use
- A small label for one control: use Tooltip instead.
- Actions and choices behind any trigger: use Dropdown Menu instead.
- The empty state of an AI app: use Starter prompts instead.
Installation
Empty State is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add empty-stateUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Framed
Dashed frame and prompts.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Bare
No frame.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Inline
One line in a table.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
EmptyState
| Prop | Type | Default | Description |
|---|---|---|---|
staterequired | EmptyModel | — | Model. |
on_action | EventHandler<()> | — | Primary action. |
on_secondary | EventHandler<()> | — | Secondary action. |
on_prompt | EventHandler<String> | — | A starter prompt was picked. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | To the action, the link and each prompt |
Accessibility
- Title and text are plain text in reading order; the action and prompts are real buttons.
Responsive behaviour
- Framed and bare centre in their container; inline fits inside a table row.
Notes for AI
- Import
EmptyStatefromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
EmptyStateElinoxyn_gpui. - Props to set first:
state. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.