No orders yet
Your first bag ships the Friday after you subscribe. Orders and tracking show up here.
import { Button, EmptyState } from '@brand-studio/ui';
import { ShoppingBag } from 'lucide-react';
export default function EmptyStateDemo() {
return (
<div style={{ width: '100%', maxWidth: 460 }}>
<EmptyState
icon={<ShoppingBag strokeWidth={1.8} />}
title="No orders yet"
description="Your first bag ships the Friday after you subscribe. Orders and tracking show up here."
action={<Button>Choose a coffee</Button>}
/>
</div>
);
}Installation
pnpm add @brand-studio/uinpm install @brand-studio/uiyarn add @brand-studio/uibun add @brand-studio/uiInstall the peer dependencies
npm install react react-domImport the stylesheet once
import '@brand-studio/ui/styles.css';Wrap your app in a brand theme
import { BrandTheme, EmptyState } from '@brand-studio/ui'; import brand from './brand.json'; <BrandTheme palette={brand.tokens} mode="system"> {/* your app */} </BrandTheme>
Usage
import { EmptyState } from '@brand-studio/ui';<EmptyState
title="No orders yet"
description="Your first bag ships the Friday after you subscribe."
action={<Button>Choose a coffee</Button>}
/>Accessibility
- The title is an
<h3>. The icon is decorative and hidden from screen readers. - Say what will appear here and give one action that makes it appear. Skip the action when the person cannot fix the emptiness.
API Reference
| Prop | Type | Default |
|---|---|---|
icon? | React.ReactNode | – |
title | React.ReactNode | – |
description? | React.ReactNode | – |
action? | React.ReactNode | – |
className? | string | '' |