Flab UIv0.0.2
MobileA2UI

Empty & error states

The states a data view spends real time in. Empty is not one state: first-run (no objects exist yet) is different from no-results (a filter cleared the list). Error is a system failure the user did not cause and cannot fix by editing input — distinct from inline field validation.

First-run empty

No customers yet

Add your first customer to start tracking accounts.

<EmptyState  title="No customers yet"  description="Add your first customer to start tracking accounts."  action={<Button variant="primary"><Plus className="size-4" /> Add customer</Button>}/>

No results

No matches

No customers match these filters.

<EmptyState  variant="no-results"  title="No matches"  description="No customers match these filters."  action={<Button variant="secondary">Clear filters</Button>}/>

No-results offers a way back to data (clear filters), never a “create first object” action — the data exists, the filter is hiding it.

Error with retry

<ErrorState  title="Couldn't load customers"  description="The request timed out. Check your connection and try again."  onRetry={() => refetch()}/>

EmptyState props

PropTypeDefaultNotes
variant'empty' | 'no-results''empty'First-run vs filtered-out; changes the default icon.
titleReactNode—The headline; carries the meaning.
descriptionReactNode—One supporting sentence.
actionReactNode—A single next step.
iconReactNode—Override the icon; null to omit.

ErrorState props

PropTypeDefaultNotes
titleReactNode—Names the failed operation.
descriptionReactNode—What happened and what to do.
onRetry() => void—Renders a labelled retry button.
retryLabelstring'Try again'Retry button text.
actionReactNode—Extra action beside retry.