Skip to content
All components

Components

Empty

An empty state says in one sentence why nothing is here and what would fill it. When there is an obvious next step, action names it and both faces draw it as a small outline button. It has no tone, because nothing has gone wrong.

One sentence

An empty state names the noun.

No tickets yet.

Empty { sentence: "No tickets yet.".into(), action: None }

With an action

At most one action, the way out of the empty state.

No agents yet.

Empty { sentence: "No agents yet.".into(), action: Some("Build an agent".into()) }

No match

A search with no match offers the way back.

No components match.

Empty {
    sentence: "No components match.".into(),
    action: Some("Clear the search".into()),
}

On the Mac

The same vocabulary drawn by Ocean UI's native face (egui on Metal), as the gallery's snapshot.

Empty drawn by Ocean UI's native face, darkEmpty drawn by Ocean UI's native face, light

Use it

Web

use ocean_ui_core::Empty;
Empty { sentence: "No tickets match this filter.".into(), action: Some("Clear filter".into()) }

Native

use ocean_ui_native::{Show, core::Empty};
let action = Some("New environment".into());
let took_it = Empty { sentence: "No environments yet.".into(), action }.show(ui).clicked();

Cargo feature base of ocean-ui-core, ocean-ui-web and ocean-ui-native; available since 2026-10-29.

Props

NameTypeDefaultWhat
sentenceString—Why nothing is here, and what would fill it.
actionOption<String>NoneThe label of one next step, a verb in sentence case.

Accessibility

  • The sentence is a plain paragraph, read in page order.
  • The action is a real button element whose label is its accessible name, so it is reached with Tab.
  • Nothing is announced when the empty state appears.

Related

Markdown

The same page as Markdown, for an agent or a pull request.

Search

esc

Components

Blocks

Screens built from blocks

The Ocean app

Ocean Base console