Skip to content

Empty state

EmptyState is a schema layout for “nothing here yet.” Use it inside a form or infolist when a repeater, relation, or custom slot has zero rows. Tables have their own empty chrome (.empty_state_heading / .empty_state_description on Table) that paints the same visual language on the index page.

Each variation below includes a short explanation, the fluent API, and a screenshot of the rendered control.

Heading plus a short description. The default heading is Nothing here when you omit .heading() and .label().

app/orbit/resources/post_resource.py
from almasix.orbit.schemas import EmptyState
EmptyState.make()
.heading("No drafts")
.description("Create one when you are ready.")

Orbit Basic empty state (light)

Orbit Basic empty state (dark)

.icon(...) renders a Heroicon above the heading so the slot reads as a destination, not an error.

app/orbit/resources/post_resource.py
EmptyState.make()
.heading("No comments")
.description("They will appear here after readers reply.")
.icon("heroicon-o-chat-bubble-left-right")

Orbit Empty state with icon (light)

Orbit Empty state with icon (dark)

.actions([...]) is a slot for Action buttons under the description — typically a Create that jumps to the resource create page.

app/orbit/resources/post_resource.py
from almasix.orbit.actions import CreateAction
from almasix.orbit.schemas import EmptyState
EmptyState.make()
.heading("No posts yet")
.description("Write the first one.")
.actions([CreateAction.make().url("/admin/posts/create")])

Orbit Empty state with actions (light)

Orbit Empty state with actions (dark)

Children passed to .schema([...]) render between the description and the action row. Use that for a short hint field or a secondary callout.

Method Role
.heading(text) Title (falls back to the component label, then “Nothing here”)
.description(text) Paragraph under the heading
.icon(name) Heroicon above the heading
.actions([...]) Buttons under the copy
.schema([...]) Nested components

Tables: Rendering a table. Closures on .visible() still apply — see Form closures.