Components
Empty State
A consistent zero-data screen with a title, description and actions.
Ombelle · light
Empty State
No presets yet
Start from a built-in family or import a preset file.
Installation
Run in a project initialized with an Ombelle preset (see Get started). The component uses the saved project preset. Run the command from your app folder; it shows the changes and asks before writing.
pnpm dlx @ombelle-ui/cli@1.1.2 add emptyAdds components/ui/empty.tsx and installs react, @radix-ui/react-slot, clsx, tailwind-merge with lifecycle scripts disabled.
In a liquid glass project the plan adds a notice that accessibility is not guaranteed, because text contrast depends on the background behind the glass.
Usage
example.tsx
import { Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription, EmptyContent } from '@/components/ui/empty'
import { Button } from '@/components/ui/button'
export function Example(){return <Empty><EmptyHeader><EmptyMedia variant="icon">+</EmptyMedia><EmptyTitle asChild><h2>No presets yet</h2></EmptyTitle><EmptyDescription>Start from a built-in family or import a preset file.</EmptyDescription></EmptyHeader><EmptyContent><Button>New preset</Button></EmptyContent></Empty>}API and states
- API
- Empty, EmptyHeader, EmptyMedia (variant), EmptyTitle (asChild), EmptyDescription, EmptyContent
- Minimum states
- With icon, without media, one or two actions
- Native basis
- Divs with an app-chosen heading
- Styles
- Stable in Ombelle, Papier, Organic, Retro futurism, minimalist, neo-brutalism and flat, light and dark. Liquid glass: stable, accessibility not guaranteed.