Skip to content
Components / Patterns

State panel

Loading, empty, error, stale and offline states.

@fabrials/ui
Loading state

No accounts yet

Add a provider account to start a sync.

Installation

  1. Import the control from @fabrials/ui, after setting the app up.

    TypeScript
    import { StatePanel } from "@fabrials/ui";

API reference

Prop / exportTypeDescription
stateloading | empty | error | stale | offline | successWhich state this is.
titleReactNodeWhat happened.
descriptionReactNodeWhat the person can do.
actionsReactNodeThe recovery action.
sizemd | smsm is 16 px of padding, for a drawer, popover, sidebar or list slot; the icon and text are the same.
variantpanel | inlineinline has no border and no tint (an overlay or palette); the icon still carries the state.
fillbooleanTakes the height of a region that has one and centres the content (an empty reader pane).
alignstart | centerWhere the icon and text sit.

Behavior

A stale observation is not shown as a fresh value. A configured connection is not proof that it can be reached.

Accessibility

Keyboard and contrast
Keep visible labels, keyboard focus and status announcements when customizing. These components inherit your theme; maintain sufficient contrast in both color modes. The preview is keyboard operable.