Empty state
Explain what belongs here and how to get started.
No collections yet
Keep related notes together.
Installation
bunx --bun shadcn@latest add https://apple-ui-eduardo.vercel.app/r/empty-state.jsonThe registry includes the shared styles and dependencies. Import @/components/apple-ui/styles.css in your root layout once. For the package route, use the installation guide.
Usage
<EmptyState
title="No collections yet"
description="Create a collection to keep related notes together."
action={<Button onClick={createCollection}>Create collection</Button>}
/>Package imports use @eduardoul/apple-ui. Registry imports use @/components/apple-ui. Add "use client" to files that use state or event handlers.
API reference
| Property | Type | Default |
|---|---|---|
| title | ReactNode | required |
| description | ReactNode | undefined |
| action | ReactNode | undefined |
Use className and style to customize the component. The package includes full TypeScript definitions for its supported element properties and refs.
Design guidance
- Explain the empty state without blaming the person.
- Offer one relevant next action.
Accessibility
Provide a visible label or accessible name. Keep keyboard focus visible and check the example with your content at 200 percent zoom. Overlays use Radix for focus management and keyboard dismissal.
Library styles support reduced motion, reduced transparency, increased contrast and forced colors. Read the accessibility foundation for the checks your application still needs.