Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
Compositions
Utilities
No Projects Yet
You haven't created any projects yet. Get started by creating your first project.
import { IconArrowUpRight, IconFolderCode } from "@tabler/icons-react"
import { EmptyView } from "@/components/compositions/empty-view"Installation#
bunx --bun shadcn@latest add @ondo-ui/empty-view
This installs EmptyView along with its empty and button dependencies.
Usage#
import { EmptyView } from "@/components/compositions/empty-view"<EmptyView
icon={<Icon />}
title="No data"
description="No data found."
actions={<Button>Add data</Button>}
/>Examples#
Basic#
Only title is required. Omit icon and actions for the simplest empty state.
No notifications
You're all caught up. New notifications will appear here.
import { EmptyView } from "@/components/compositions/empty-view"
export default function EmptyViewBasic() {With actions#
Pass buttons or links through the actions slot.
Cloud Storage Empty
Upload files to your cloud storage to access them anywhere.
import { IconCloud } from "@tabler/icons-react"
import { EmptyView } from "@/components/compositions/empty-view"API reference#
EmptyView accepts every prop of Empty (it spreads ...props onto the root), plus:
| Prop | Type | Default | Description |
|---|---|---|---|
title | React.ReactNode | — | Required heading text. |
description | React.ReactNode | — | Optional supporting text. Omitted when not provided. |
icon | React.ReactNode | — | Optional media, rendered inside EmptyMedia (icon variant). |
actions | React.ReactNode | — | Optional buttons/links, rendered inside EmptyContent. |
className | string | — | Passed through to the root Empty. |
Built on#
EmptyView composes these primitives:
Need a layout EmptyView doesn't cover? Compose Empty directly for full control over the parts.