Empty
glasswave/emptyFreeComponent
Empty-state layout with media, title, and actions.
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/empty.jsonSource
1import { cn } from "@/lib/utils";23export function Empty({ className, ...props }: React.ComponentProps<"div">) {4 return (5 <div6 data-slot="empty"7 className={cn(8 "flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-[32px] border border-dashed border-black/10 dark:border-white/15 p-10 text-center",9 className,10 )}11 {...props}12 />13 );14}1516export function EmptyHeader({17 className,18 ...props19}: React.ComponentProps<"div">) {20 return (21 <div22 data-slot="empty-header"23 className={cn(24 "flex max-w-sm flex-col items-center gap-2 text-center",25 className,26 )}27 {...props}28 />29 );30}3132export function EmptyMedia({33 className,34 variant = "default",35 ...props36}: React.ComponentProps<"div"> & { variant?: "default" | "icon" }) {37 return (38 <div39 data-slot="empty-media"40 data-variant={variant}41 className={cn(42 "flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",43 variant === "default" &&44 "bg-black/[0.04] dark:bg-white/[0.06] rounded-2xl size-12 border border-black/[0.08] dark:border-white/10 [&_svg:not([class*='size-'])]:size-6",45 variant === "icon" &&46 "bg-transparent [&_svg:not([class*='size-'])]:size-10 text-current/50",47 className,48 )}49 {...props}50 />51 );52}5354export function EmptyTitle({55 className,56 ...props57}: React.ComponentProps<"div">) {58 return (59 <div60 data-slot="empty-title"61 className={cn(62 "text-lg font-semibold tracking-tight text-current",63 className,64 )}65 {...props}66 />67 );68}6970export function EmptyDescription({71 className,72 ...props73}: React.ComponentProps<"p">) {74 return (75 <p76 data-slot="empty-description"77 className={cn(78 "text-sm text-current/65 [&>a:hover]:text-current [&>a]:underline [&>a]:underline-offset-4",79 className,80 )}81 {...props}82 />83 );84}8586export function EmptyContent({87 className,88 ...props89}: React.ComponentProps<"div">) {90 return (91 <div92 data-slot="empty-content"93 className={cn(94 "flex w-full max-w-sm min-w-0 flex-col items-center gap-4",95 className,96 )}97 {...props}98 />99 );100}
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
