BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/uiable/empty

Empty

uiable/empty
FreeComponent

Empty component.

Live preview

live · rendered by the registry
Rendered by uiable on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://uiable.com/r/empty.json

Source

src/components/ui/empty.tsxuiable.com/r/empty.json
1import { ComponentProps } from "react"
2import { cva, type VariantProps } from "class-variance-authority"
3
4import { cn } from "@/lib/utils"
5
6function Empty({ className, ...props }: ComponentProps<"div">) {
7 return (
8 <div
9 data-slot="empty"
10 className={cn(
11 "flex flex-col items-center justify-center p-6 text-center",
12 className
13 )}
14 {...props}
15 />
16 )
17}
18
19function EmptyHeader({ className, ...props }: ComponentProps<"div">) {
20 return (
21 <div
22 data-slot="empty-header"
23 className={cn("mb-6 flex flex-col items-center gap-3", className)}
24 {...props}
25 />
26 )
27}
28
29const emptyMediaVariants = cva(
30 "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
31 {
32 variants: {
33 variant: {
34 default: "bg-transparent",
35 icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
36 },
37 },
38 defaultVariants: {
39 variant: "default",
40 },
41 }
42)
43
44function EmptyMedia({
45 className,
46 variant = "default",
47 ...props
48}: ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>) {
49 return (
50 <div
51 data-slot="empty-icon"
52 data-variant={variant}
53 className={cn(
54 "flex justify-center",
55 emptyMediaVariants({ variant, className })
56 )}
57 {...props}
58 />
59 )
60}
61
62function EmptyTitle({ className, ...props }: ComponentProps<"div">) {
63 return (
64 <h3
65 data-slot="empty-title"
66 className={cn("text-lg font-semibold", className)}
67 {...props}
68 />
69 )
70}
71
72function EmptyDescription({ className, ...props }: ComponentProps<"p">) {
73 return (
74 <p
75 data-slot="empty-description"
76 className={cn("text-base text-muted-foreground", className)}
77 {...props}
78 />
79 )
80}
81
82function EmptyContent({ className, ...props }: ComponentProps<"div">) {
83 return (
84 <div
85 data-slot="empty-content"
86 className={cn(
87 "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
88 className
89 )}
90 {...props}
91 />
92 )
93}
94
95export {
96 Empty,
97 EmptyHeader,
98 EmptyTitle,
99 EmptyDescription,
100 EmptyContent,
101 EmptyMedia,
102}

What it pulls in

npm packages

  • class-variance-authority

Files it writes

  • src/components/ui/empty.tsx

Facts

Registry
uiable
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on uiable uiable.com codedthemes/uiable on GitHub Raw registry item This item as JSON

More from uiable

All 712 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionuiableComponentsFree2 deps
AlertalertuiableComponentsFree1 dep
Alert Dialogalert-dialoguiableComponentsFree1 dep
Aspect Ratioaspect-ratiouiableComponentsFreeno deps
AttachmentattachmentuiableComponentsFree2 deps
AvataravataruiableComponentsFree1 dep
BadgebadgeuiableComponentsFree2 deps
BreadcrumbbreadcrumbuiableComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex