Component
Empty State
A centered column for empty/zero-result states and inline confirmations. Includes ConfirmationCard, a bordered preset for messages like "Check your email".
Basic
An icon chip, title, description, and an optional action row.
No messages yet
When you receive messages, they'll show up here.
Tones
The tone prop tints the icon chip.
Neutral
Default tone.
Success
Everything is done.
Warning
Something needs attention.
Danger
An error occurred.
Installation
$
pnpm add @refraction-ui/react-empty-stateUsage
tsx
import { EmptyState, ConfirmationCard } from '@refraction-ui/react-empty-state'
export function MyComponent() {
return (
<EmptyState
icon={<InboxIcon />}
title="No messages yet"
description="When you receive messages, they'll show up here."
actions={<button>Compose</button>}
/>
)
}
// ConfirmationCard is EmptyState with bordered defaulting to true
export function CheckEmail() {
return (
<ConfirmationCard
icon={<MailIcon />}
tone="success"
title="Check your email"
description={<>We sent a sign-in link to <strong>jane@example.com</strong>.</>}
/>
)
}Confirmation
ConfirmationCard is EmptyState with bordered defaulting to true — ideal for a "Check your email" message after sending a magic link.
Check your email
We sent a sign-in link to jane@example.com. It expires in 10 minutes.
Bordered
Pass bordered to render the content on a card surface.
Without border
bordered = false
With border
bordered = true
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | React.ReactNode | -- | Primary heading (required). |
description | React.ReactNode | -- | Optional supporting copy. Supports rich children (e.g. an emphasized email). |
icon | React.ReactNode | -- | Optional icon rendered inside a tone-tinted rounded chip. |
tone | 'neutral' | 'success' | 'warning' | 'danger' | 'neutral' | Tints the icon chip background and foreground. |
actions | React.ReactNode | -- | Optional action row, centered under the description. |
bordered | boolean | false | Wraps the content in a rounded card surface with a border. |
className | string | -- | Additional CSS classes to apply. |