Aurora Empty State
aurora-dinglebear-ai/aurora-empty-stateUnverifiedComponent
Centered empty state with icon slot, heading, description, and optional CTA button.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/dinglebear-ai/aurora/main/aurora-empty-state.jsonSource
1"use client";23import * as React from "react";4import { cn } from "@/lib/utils";56// ---------------------------------------------------------------------------7// Types8// ---------------------------------------------------------------------------910export interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {11 icon?: React.ReactNode;12 title: string;13 description?: React.ReactNode;14 action?: React.ReactNode;15 className?: string;16 /** Heading level for the title. Defaults to "p" for flexibility; set to "h2"/"h3" when inside a section. */17 as?: "h1" | "h2" | "h3" | "h4" | "p";18}1920// ---------------------------------------------------------------------------21// Component22// ---------------------------------------------------------------------------2324export function EmptyState({25 ref,26 icon,27 title,28 description,29 action,30 className,31 as: Heading = "p",32 ...rest33}: EmptyStateProps & { ref?: React.Ref<HTMLDivElement> }) {34 const titleId = React.useId();35 const descriptionId = React.useId();3637 return (38 <div39 ref={ref}40 className={cn(41 "flex flex-col items-center justify-center gap-5 px-8 py-14 text-center",42 className,43 )}44 style={{45 border: `1.5px dashed var(--aurora-border-default)`,46 borderRadius: "var(--aurora-radius-2)",47 }}48 aria-labelledby={titleId}49 aria-describedby={description ? descriptionId : undefined}50 {...rest}51 >52 {/* Icon slot */}53 {icon && (54 <span55 aria-hidden56 className="flex items-center justify-center"57 style={{58 width: 52,59 height: 52,60 background: "var(--aurora-control-surface)",61 border: `1px solid var(--aurora-border-strong)`,62 borderRadius: 14,63 flexShrink: 0,64 color: "var(--aurora-text-muted)",65 }}66 >67 {icon}68 </span>69 )}7071 <div className="flex flex-col items-center gap-2">72 {/* Title */}73 <Heading74 id={titleId}75 className="aurora-text-section"76 style={{77 fontWeight: "var(--aurora-weight-heading)",78 lineHeight: "var(--aurora-line-dense)",79 color: "var(--aurora-text-primary)",80 }}81 >82 {title}83 </Heading>8485 {/* Description */}86 {description && (87// … truncated
What it pulls in
Other registry items
Files it writes
More from aurora
All 176 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Aurora Accordionaurora-accordion | aurora | Components | Unverified | 2 deps | |
| Aurora Alert Dialogaurora-alert-dialog | aurora | Components | Unverified | 2 deps | |
| Aurora Aspect Ratioaurora-aspect-ratio | aurora | Components | Unverified | no deps | |
| Aurora Avataraurora-avatar | aurora | Components | Unverified | 1 dep | |
| Aurora Badgeaurora-badge | aurora | Components | Unverified | 2 deps | |
| Aurora Banneraurora-banner | aurora | Components | Unverified | 1 dep | |
| Aurora Breadcrumbaurora-breadcrumb | aurora | Components | Unverified | 2 deps | |
| Aurora Buttonaurora-button | aurora | Components | Unverified | 2 deps |
