Empty statesPro
A useful next step when there is nothing to show: first run, no results, no runs, inbox zero, offline, error and no access.
oxyn add empty-statesThe 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
- A next step when there is nothing to show: first run, no results, no runs, inbox zero, offline, error, no access.
When not to use
- A small turning arc for work that runs right now, plus dots, ray and orbit styles: use Spinner instead.
- The empty state of an AI app: use Starter prompts instead.
- Fourteen text-glyph loaders (braille, sand, blocks, scanner…) that settle into a check, a warning or a cross when the agent finishes, waits or fails: use Glyph loader instead.
Installation
Empty states 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-statesUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
First run
Nothing created yet.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
No results
A search that matched nothing.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Offline
Offline.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Starter
First run with starter prompts (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Inline
One line in a list.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
EmptyPreset
| Prop | Type | Default | Description |
|---|---|---|---|
preset | String | "first-run" | Preset id. |
query | String | Default::default() | Query for no-results. |
layout | String | "framed" | `framed` · `bare` · `inline`. |
prompts | Vec<String> | Default::default() | Starter prompts (first-run). |
on_action | EventHandler<()> | — | Primary action. |
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 actions |
Accessibility
- role=status with a title; the icon is aria-hidden.
- Copy changes roll in place.
From the spec
role=status with the title; the icon is decorative.
Motion & interaction
Changing preset rolls the block in place (rise + fade); the icon tile pops.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Roll | 280 ms | ease.out | instant |
Responsive behaviour
- Centred up to 520px.
Edge cases (spec)
No-results reflects the query. Long text wraps up to 520 px.
Notes for AI
- Import
EmptyPreset,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.