React Native · Components
EmptyState
Screen for an empty list, a search with no results, an error, offline or unauthorized state.
4 exports
Live example
The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.
Preview
Nothing here yet
Code
Events
- Events appear here when you interact with the preview.
Import
EmptyState
componentScreen for an empty list, a search with no results, an error, offline or unauthorized state. Built-in states come with texts in the current language.
Examples
EmptyStatePreset
typeBuilt-in empty states: icon, color and text come together (same as web).
Variant: borderless, a dashed box or a card.
EmptyStateProps
interfaceProps of EmptyState.
| Name | Type | Default | Description |
|---|---|---|---|
preset? | EmptyStatePreset | "empty" | Built-in state. |
title? | ReactNode | Title; defaults to the built-in state's text. | |
description? | ReactNode | Description; defaults to the built-in state's text. | |
icon? | IconProp | null | Icon; null for none. | |
image? | ReactNode | An image instead of the icon (e.g. <Image />). | |
action? | ReactNode | Primary action (e.g. <Button>Add product</Button>). | |
secondaryAction? | ReactNode | Secondary action. | |
tone? | Tone | Color of the icon background; defaults to the built-in state's. | |
variant? | EmptyStateVariant | (string & {}) | "plain" | Variant: one of the built-in variants or a name added with appearance.variants.emptyState. |
effect? | EffectProp | Effect or effects. Defaults to appearance.defaults.emptyState.effect. See BuiltinEffect. | |
size? | Size | "md" | Size. |
align? | "center" | "start" | "center" | Alignment. |
children? | ReactNode | Extra content below the actions. | |
style? | StyleProp<ViewStyle> | Container style. |