API reference
blocks/empty-state
Import
Section titled “Import”import * as api from "@fungi.computer/caps/blocks/empty-state";Exports
Section titled “Exports”| 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”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”type EmptyStateHeadingLevel = 2 | 3 | 4;The document heading level of an EmptyState title.
EmptyStateVisualStatetype alias
Section titled “EmptyStateVisualState”type EmptyStateVisualState = Readonly<{ speaking: boolean; thinking: boolean;}>;What a visual is told while the EmptyState is on screen.
EmptyStateSuggestiontype alias
Section titled “EmptyStateSuggestion”type EmptyStateSuggestion = Readonly<{ label: string; onSelect: () => void;}>;A suggested next step, shown as a chip the host acts on.
EmptyStatePropstype alias
Section titled “EmptyStateProps”type EmptyStateProps = Omit<HTMLAttributes<HTMLElement>, "title"> & object;Props accepted by EmptyState.
Type Declaration
Section titled “Type Declaration”| 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”const EmptyState: ForwardRefExoticComponent< Omit<HTMLAttributes<HTMLElement>, "title"> & object & RefAttributes<HTMLElement>>;Product-neutral absence presentation; hosts supply copy, art, and actions.