Skip to content
Alea0.1

Feedback

EmptyState and Result

What to show when there is nothing yet, and the outcome of a flow or a page.

Ant Design: Empty, Result

import { EmptyState, Result } from '@alea/ui';

Examples

EmptyState

Nothing yet, and what to do about it.

No palettes yet

Make your first one from a brand color. It takes about a minute.

Result

Done, failed, not found, no access.

Payment received

Your license key is in your inbox.

Page not found

It moved, or it never existed.

Props

EmptyState props

What to show when there is nothing yet, and what to do about it (Ant's Empty).

PropTypeDefaultDescription
titlerequiredReactNode-What is empty, in a few words.
actionReactNode-A button to fix it: "Create your first palette".
descriptionReactNode-What to do about it.
headingAsElementType'h3'The title's heading element. Default h3.
iconReactNode-An icon or illustration. Default an inbox.

Result props

The outcome of a flow or a whole page: done, failed, not found, no access (Ant's Result).

PropTypeDefaultDescription
statusrequired"success" | "error" | "404" | "403" | "500" | "info"-success, error, 404, 403, 500 or info.
titlerequiredReactNode-What is empty, in a few words.
actionReactNode-A button to fix it: "Create your first palette".
descriptionReactNode-What to do about it.
headingAsElementType-The title's heading element. Default h3.

Do and don't

Do

  • Say what to do next and offer the button for it.

Don't

  • Don't blame the person.
Tested with axe, keyboard and screen reader roles