Skip to content

Component EmptyState

MeowLynxSea edited this page Jun 18, 2026 · 3 revisions

EmptyState

A "no data" / "no results" block: optional icon, title, description, optional action.

use yororen_ui::headless::empty_state::empty_state;
use yororen_ui::headless::icon::IconSource;

empty_state("no-results", cx)
    .icon(IconSource::Named(IconName::Search))
    .title("No matches")
    .description("Try a different keyword.")
    .action(/* any element, e.g. a button */)
    .render(cx)

Props

Method Purpose
icon(source) Optional leading IconSource.
title(text) Main heading.
description(text) Supporting line below the title.
action(el) Optional action element (typically a Button).

All fields are optional — pass only what you have.

Factory takes (id, _cx). .render(cx) returns Stateful<Div>.

See also: Card, Heading.

Clone this wiki locally