Navigation

Empty state

<oblyx-empty-state> is a placeholder shown in place of content that would otherwise be there: a zero-results search, a not-yet-populated list, an empty table. It carries a heading, an optional description and icon, and an optional action row.

Basic empty state

HTMLKotlin
<oblyx-empty-state heading="No projects yet"></oblyx-empty-state>
oblyxEmptyState(heading = "No projects yet")

Description and icon

description adds supporting text under the heading. icon resolves against the same registry <oblyx-icon> uses; there is no default, since an empty state has no inherent status the way <oblyx-alert> does.

Empty state with a description and icon

HTMLKotlin
<oblyx-empty-state
  heading="No results"
  description="Try a different search term or clear your filters."
  icon="search"
></oblyx-empty-state>
oblyxEmptyState(
  heading = "No results",
  description = "Try a different search term or clear your filters.",
  icon = OblyxIconName.SEARCH,
)

Action row

The element's own light content is a single action row, typically one or more <oblyx-button> elements, for the one action that resolves the empty state, such as creating the first record.

Empty state with an action

New project
HTMLKotlin
<oblyx-empty-state
  heading="No projects yet"
  description="Create your first project to get started."
>
  <oblyx-button variant="primary">New project</oblyx-button>
</oblyx-empty-state>
oblyxEmptyState(
  heading = "No projects yet",
  description = "Create your first project to get started.",
) {
  oblyxButton(variant = OblyxButtonVariant.PRIMARY) { +"New project" }
}

Compact

compact tightens padding and spacing, and stacks the action row vertically instead of horizontally. Use it where an empty state sits in a small space, such as inside a table's empty row.

Compact empty state

HTMLKotlin
<oblyx-empty-state
  compact
  heading="No results"
  description="Try a different search term."
  icon="search"
></oblyx-empty-state>
oblyxEmptyState(
  compact = true,
  heading = "No results",
  description = "Try a different search term.",
  icon = OblyxIconName.SEARCH,
)

heading, not title

The heading attribute is heading, not title. title is already a global HTML attribute, the native hover-tooltip text every element carries, so reusing it here would both arm a tooltip nobody asked for and collide with the type every element already declares for it.

Reference

<oblyx-empty-state>

AttributeTypeDefaultDescription
headingstring | undefinedHeading text. Required: there is no reasonable default message for an empty state with no heading.
descriptionstring | undefinedOptional supporting text under the heading.
iconclosechevronDownchevronLeftchevronRightchevronsLeftchevronsRightchecksuccesserrorwarninginfocalendarclockexternalLinkmenumoreHorizontalsearcharrowUparrowDownarrowsUpDownfunneleyeSlashviewColumnscopycheckDoublewrenchstopmicrophoneoblyx-icon registry name. Omitted entirely renders no icon; an empty state has no inherent status the way oblyx-alert does, so there is no default to fall back to.
heading-levelnumber3Heading level of the rendered title, one of 1 through 6. Changes only the emitted tag, never the visual size.
compactbooleanfalseTightens padding and spacing, and stacks the action row vertically instead of horizontally.