EmptyState

What to show when there is nothing yet. Cards fan out behind an icon, the text rises in and hovering spreads the cards. Layout.

Open playground

No messages yet

When someone writes to you, the conversation will show up here.

About

EmptyState is a React component in the Layout category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { EmptyState } from "@ashutoshswamy/smoui" and set title, icon, action among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { EmptyState } from "@ashutoshswamy/smoui";

<EmptyState icon="inbox" title="No messages yet" description="Conversations show up here." action="Compose" onAction={() => compose()} />

Props 4

title / description

Copy.

string
icon

Heroicon name.

IconNamedefault "inbox"
action / secondary

Button labels. Use onAction and onSecondary.

string
children

Replaces the built-in buttons.

ReactNode