Skip to content

blocks/empty-state

EmptyStateVariant = "plain" | "panel" | "speech" | "hint"

How an absence presents itself. plain leaves layout to the host; panel is a recessed, centered invitation; speech lets the visual (a mascot) say the copy from a molded speech bubble; hint is a quiet centered footnote under content, such as the next thing to try.


EmptyStateVisualState = Readonly<{ speaking: boolean; thinking: boolean; }>

What a visual is told while the EmptyState is on screen.


EmptyStateSuggestion = Readonly<{ label: string; onSelect: () => void; }>

A suggested next step, shown as a chip the host acts on.


EmptyStateProps = Omit<HTMLAttributes<HTMLElement>>, "title"> > & object

Props accepted by EmptyState.

optional actions?: ReactNode

description: ReactNode

optional suggestions?: readonly EmptyStateSuggestion[]

Chips that offer a starting point, such as a prompt to try.

optional thinking?: boolean

The host is working on something, such as creating what this state invites.

title: ReactNode

optional visual?: ReactNode

Static art.

optional renderVisual?: (state) => ReactNode

Render a visual from the current speaking and thinking state.

EmptyStateVisualState

ReactNode

optional variant?: EmptyStateVariant

const EmptyState: ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>>, "title"> > & object & RefAttributes<HTMLElement>>>>

Product-neutral absence presentation; hosts supply copy, art, and actions.