Component
EmptyState
A FormaUI empty state — the centered "nothing here yet / no results" placeholder with an optional illustration, a title, a description, and an optional action.
dev.formaui.components.emptystate
Title onlyWith descriptionWith iconWith action
Preview
This toggle is site chrome only — the preview has its own light/dark switch inside.
Live preview
Live preview — ~37 MB development build
Usage
FormaEmptyState(
title = "No transactions yet",
description = "Your transactions will appear here once you make your first payment.",
icon = { Icon(Icons.Outlined.Receipt, contentDescription = null) },
action = { FormaButton(onClick = { /* add payment */ }) { Text("Add payment") } },
)FormaEmptyState
Centered empty-state placeholder composed from FormaUI tokens (no Material 3 equivalent); only title is required.
ParameterTypeDefaultDescription
titlerequiredTypeStringDefaultrequiredDescriptionthe primary message (required).
modifierTypeModifierDefaultModifierDescriptionthe Modifier applied to the empty state.
descriptionTypeString?DefaultnullDescriptionoptional secondary explanatory text.
iconType@Composable (() -> Unit)?DefaultnullDescriptionoptional illustration/icon slot shown above the title.
actionType@Composable (() -> Unit)?DefaultnullDescriptionoptional action slot shown below the text (typically a FormaButton).
Accessibility
title and description render as real Text, so both are announced in order; the icon slot is decorative — pass contentDescription = null on it — and any action should be a labelled control such as a FormaButton.