Skip to content
API reference

blocks/empty-state

Import
import * as api from "@fungi.computer/caps/blocks/empty-state";
Kind Export Description
type alias EmptyStateVariant 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; quiet is a left-aligned absence nested under a card or section heading, titled below that heading.
type alias EmptyStateHeadingLevel The document heading level of an EmptyState title.
type alias EmptyStateVisualState What a visual is told while the EmptyState is on screen.
type alias EmptyStateSuggestion A suggested next step, shown as a chip the host acts on.
type alias EmptyStateProps Props accepted by EmptyState.
constant EmptyState Product-neutral absence presentation; hosts supply copy, art, and actions.

EmptyStateVarianttype alias

Section titled “EmptyStateVariant”
Signature
type EmptyStateVariant = "plain" | "panel" | "speech" | "hint" | "quiet";

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; quiet is a left-aligned absence nested under a card or section heading, titled below that heading.


EmptyStateHeadingLeveltype alias

Section titled “EmptyStateHeadingLevel”
Signature
type EmptyStateHeadingLevel = 2 | 3 | 4;

The document heading level of an EmptyState title.


EmptyStateVisualStatetype alias

Section titled “EmptyStateVisualState”
Signature
type EmptyStateVisualState = Readonly<{
speaking: boolean;
thinking: boolean;
}>;

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


EmptyStateSuggestiontype alias

Section titled “EmptyStateSuggestion”
Signature
type EmptyStateSuggestion = Readonly<{
label: string;
onSelect: () => void;
}>;

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


EmptyStatePropstype alias

Section titled “EmptyStateProps”
Signature
type EmptyStateProps = Omit<HTMLAttributes<HTMLElement>, "title"> & object;

Props accepted by EmptyState.

Name Type Description
actions? ReactNode -
description ReactNode -
suggestions? readonly EmptyStateSuggestion[] Chips that offer a starting point, such as a prompt to try.
thinking? boolean The host is working on something, such as creating what this state invites.
title ReactNode -
headingLevel? EmptyStateHeadingLevel Heading level for the title; use one below the heading it sits under.
visual? ReactNode Static art.
renderVisual()? (state) => ReactNode Render a visual from the current speaking and thinking state.
variant? EmptyStateVariant -

EmptyStateconstant

Section titled “EmptyState”
Signature
const EmptyState: ForwardRefExoticComponent<
Omit<HTMLAttributes<HTMLElement>, "title"> &
object &
RefAttributes<HTMLElement>
>;

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