{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty-state",
  "type": "registry:component",
  "title": "Empty State",
  "description": "A zero-data state with four floating inline illustrations, a title, a description and primary and secondary actions.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "site",
    "empty state",
    "zero data",
    "illustration",
    "placeholder",
    "cta",
    "no results"
  ],
  "docs": "https://hyperblur.dev/effects/empty-state",
  "files": [
    {
      "path": "registry/hyperblur/empty-state.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/empty-state.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface EmptyStateAction {\n  label: string;\n  onClick?: () => void;\n  href?: string;\n}\n\nexport interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> {\n  illustration?: \"inbox\" | \"search\" | \"folder\" | \"chart\" | \"none\";\n  title?: React.ReactNode;\n  description?: React.ReactNode;\n  primaryAction?: EmptyStateAction;\n  secondaryAction?: EmptyStateAction;\n  size?: \"md\" | \"sm\";\n  accent?: string;\n}\n\nconst css = `\n.hb-emp {\n  --hb-emp-accent: #2f7bff;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  box-sizing: border-box;\n  width: 100%;\n  padding: 28px 20px;\n  color: #ededed;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  text-align: center;\n}\n.hb-emp *, .hb-emp *::before, .hb-emp *::after { box-sizing: border-box; }\n.hb-emp[data-size=\"sm\"] { padding: 16px 14px; }\n.hb-emp-art { display: block; width: 160px; height: 120px; overflow: visible; }\n.hb-emp[data-size=\"sm\"] .hb-emp-art { width: 104px; height: 78px; }\n.hb-emp-float { animation: hb-emp-float 4.2s ease-in-out infinite; }\n.hb-emp-float-b { animation: hb-emp-float-b 3.4s ease-in-out infinite; }\n.hb-emp-float-c { animation: hb-emp-float 5s ease-in-out -1.6s infinite; }\n.hb-emp-shadow { transform-box: fill-box; transform-origin: center; animation: hb-emp-shadow 4.2s ease-in-out infinite; }\n.hb-emp-spin { transform-box: fill-box; transform-origin: center; animation: hb-emp-sway 4.6s ease-in-out infinite; }\n.hb-emp-title {\n  margin: 8px 0 0;\n  color: #ededed;\n  font-size: 17px;\n  font-weight: 600;\n  line-height: 1.3;\n  letter-spacing: -0.01em;\n}\n.hb-emp[data-size=\"sm\"] .hb-emp-title { margin-top: 4px; font-size: 14px; }\n.hb-emp-desc {\n  max-width: 34ch;\n  margin: 6px 0 0;\n  color: #8f8f8f;\n  font-size: 13.5px;\n  line-height: 1.55;\n}\n.hb-emp[data-size=\"sm\"] .hb-emp-desc { margin-top: 3px; font-size: 12px; line-height: 1.45; }\n.hb-emp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; }\n.hb-emp[data-size=\"sm\"] .hb-emp-actions { margin-top: 12px; gap: 6px; }\n.hb-emp-btn {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  height: 34px;\n  margin: 0;\n  padding: 0 16px;\n  border: 1px solid #262626;\n  border-radius: 999px;\n  background: #171717;\n  color: #ededed;\n  font: inherit;\n  font-size: 13px;\n  font-weight: 500;\n  line-height: 1;\n  text-decoration: none;\n  white-space: nowrap;\n  cursor: pointer;\n  -webkit-tap-highlight-color: transparent;\n  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;\n}\n.hb-emp[data-size=\"sm\"] .hb-emp-btn { height: 28px; padding: 0 12px; font-size: 12px; }\n.hb-emp-btn:hover { background: #1f1f1f; border-color: #333333; }\n.hb-emp-btn:active { transform: scale(0.97); }\n.hb-emp-btn:focus-visible { outline: 2px solid var(--hb-emp-accent); outline-offset: 2px; }\n.hb-emp-btn[data-primary=\"true\"] { background: #ededed; border-color: #ededed; color: #0a0a0a; font-weight: 600; }\n.hb-emp-btn[data-primary=\"true\"]:hover { background: #ffffff; border-color: #ffffff; }\n.hb-emp-btn[data-primary=\"false\"] { background: transparent; border-color: transparent; color: #a1a1a1; }\n.hb-emp-btn[data-primary=\"false\"]:hover { background: rgba(255, 255, 255, 0.07); color: #ededed; }\n@keyframes hb-emp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }\n@keyframes hb-emp-float-b { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }\n@keyframes hb-emp-shadow { 0%, 100% { transform: scaleX(1); opacity: 0.55; } 50% { transform: scaleX(0.82); opacity: 0.32; } }\n@keyframes hb-emp-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }\n@media (prefers-reduced-motion: reduce) {\n  .hb-emp-float, .hb-emp-float-b, .hb-emp-float-c, .hb-emp-shadow, .hb-emp-spin { animation: none; }\n  .hb-emp-btn { transition: none; }\n}\n`;\n\nconst line = \"#2e2e2e\";\nconst fillA = \"#171717\";\nconst fillB = \"#1f1f1f\";\n\nfunction Shadow({ cx = 80, rx = 36 }: { cx?: number; rx?: number }) {\n  return <ellipse className=\"hb-emp-shadow\" cx={cx} cy=\"108\" rx={rx} ry=\"5\" fill=\"#000000\" opacity=\"0.5\" />;\n}\n\nfunction InboxArt() {\n  return (\n    <svg className=\"hb-emp-art\" viewBox=\"0 0 160 120\" fill=\"none\" aria-hidden=\"true\">\n      <Shadow />\n      <g className=\"hb-emp-float-b\">\n        <rect x=\"58\" y=\"16\" width=\"44\" height=\"40\" rx=\"6\" fill={fillB} stroke={line} strokeWidth=\"1.5\" />\n        <path d=\"M66 27h28M66 35h28M66 43h16\" stroke=\"#3a3a3a\" strokeWidth=\"2.5\" strokeLinecap=\"round\" />\n        <circle cx=\"98\" cy=\"20\" r=\"6\" fill=\"var(--hb-emp-accent)\" />\n        <path d=\"m95.4 20 1.8 1.8 3.2-3.4\" stroke=\"#fff\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n      </g>\n      <g className=\"hb-emp-float\">\n        <path d=\"M30 70 46 44a6 6 0 0 1 5-3h58a6 6 0 0 1 5 3l16 26v22a9 9 0 0 1-9 9H39a9 9 0 0 1-9-9V70Z\" fill={fillA} stroke={line} strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n        <path d=\"M30 70h28q4 0 6 4 4 9 16 9t16-9q2-4 6-4h28v22a9 9 0 0 1-9 9H39a9 9 0 0 1-9-9V70Z\" fill={fillB} stroke={line} strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n        <path d=\"M52 94h56\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"2.5\" strokeLinecap=\"round\" opacity=\"0.7\" />\n      </g>\n    </svg>\n  );\n}\n\nfunction SearchArt() {\n  return (\n    <svg className=\"hb-emp-art\" viewBox=\"0 0 160 120\" fill=\"none\" aria-hidden=\"true\">\n      <Shadow />\n      <g className=\"hb-emp-float-c\">\n        <rect x=\"30\" y=\"18\" width=\"70\" height=\"86\" rx=\"8\" fill={fillA} stroke={line} strokeWidth=\"1.5\" />\n        <path d=\"M42 34h30M42 46h46M42 58h38M42 70h24M42 82h40\" stroke=\"#333333\" strokeWidth=\"3\" strokeLinecap=\"round\" />\n      </g>\n      <g className=\"hb-emp-float\">\n        <g className=\"hb-emp-spin\">\n          <circle cx=\"98\" cy=\"58\" r=\"26\" fill=\"rgba(10,10,10,0.72)\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"4\" />\n          <path d=\"M92 52q0-8 8-8t8 7q0 5-8 8\" stroke=\"#ededed\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\" opacity=\"0.85\" />\n          <circle cx=\"100\" cy=\"72\" r=\"2.4\" fill=\"#ededed\" opacity=\"0.85\" />\n          <path d=\"m117 77 17 18\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"8\" strokeLinecap=\"round\" />\n        </g>\n      </g>\n    </svg>\n  );\n}\n\nfunction FolderArt() {\n  return (\n    <svg className=\"hb-emp-art\" viewBox=\"0 0 160 120\" fill=\"none\" aria-hidden=\"true\">\n      <Shadow rx={40} />\n      <g className=\"hb-emp-float\">\n        <path d=\"M24 38a8 8 0 0 1 8-8h28l9 10h59a8 8 0 0 1 8 8v46a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V38Z\" fill={fillA} stroke={line} strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n        <g className=\"hb-emp-float-b\">\n          <rect x=\"48\" y=\"24\" width=\"48\" height=\"48\" rx=\"5\" fill=\"none\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"1.75\" strokeDasharray=\"4 4\" opacity=\"0.85\" />\n          <path d=\"M60 40h24M60 50h24M60 60h12\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"2.5\" strokeLinecap=\"round\" opacity=\"0.55\" />\n        </g>\n        <path d=\"M24 56a8 8 0 0 1 8-8h96a8 8 0 0 1 8 8v36a8 8 0 0 1-8 8H32a8 8 0 0 1-8-8V56Z\" fill={fillB} stroke={line} strokeWidth=\"1.5\" strokeLinejoin=\"round\" />\n        <path d=\"M70 74h20\" stroke=\"#3a3a3a\" strokeWidth=\"3\" strokeLinecap=\"round\" />\n      </g>\n    </svg>\n  );\n}\n\nfunction ChartArt() {\n  return (\n    <svg className=\"hb-emp-art\" viewBox=\"0 0 160 120\" fill=\"none\" aria-hidden=\"true\">\n      <Shadow rx={42} />\n      <g className=\"hb-emp-float\">\n        <rect x=\"22\" y=\"14\" width=\"116\" height=\"86\" rx=\"10\" fill={fillA} stroke={line} strokeWidth=\"1.5\" />\n        <path d=\"M36 38h88M36 58h88M36 78h88\" stroke=\"#262626\" strokeWidth=\"1\" strokeDasharray=\"2 4\" />\n        <rect x=\"42\" y=\"64\" width=\"14\" height=\"22\" rx=\"3\" fill=\"none\" stroke=\"#3a3a3a\" strokeWidth=\"1.5\" strokeDasharray=\"3 3\" />\n        <rect x=\"66\" y=\"50\" width=\"14\" height=\"36\" rx=\"3\" fill=\"none\" stroke=\"#3a3a3a\" strokeWidth=\"1.5\" strokeDasharray=\"3 3\" />\n        <rect x=\"90\" y=\"58\" width=\"14\" height=\"28\" rx=\"3\" fill=\"none\" stroke=\"#3a3a3a\" strokeWidth=\"1.5\" strokeDasharray=\"3 3\" />\n        <rect x=\"114\" y=\"42\" width=\"14\" height=\"44\" rx=\"3\" fill=\"none\" stroke=\"#3a3a3a\" strokeWidth=\"1.5\" strokeDasharray=\"3 3\" />\n        <path d=\"M36 86h92\" stroke=\"#3a3a3a\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n      </g>\n      <g className=\"hb-emp-float-b\">\n        <path d=\"M34 70q18-4 30-14t30-6 32-18\" stroke=\"var(--hb-emp-accent)\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeDasharray=\"1 6\" />\n        <circle cx=\"126\" cy=\"32\" r=\"5\" fill=\"var(--hb-emp-accent)\" />\n        <circle cx=\"126\" cy=\"32\" r=\"9\" fill=\"var(--hb-emp-accent)\" opacity=\"0.18\" />\n      </g>\n    </svg>\n  );\n}\n\nconst arts = { inbox: InboxArt, search: SearchArt, folder: FolderArt, chart: ChartArt };\n\nfunction ActionButton({ action, primary }: { action: EmptyStateAction; primary: boolean }) {\n  if (action.href) {\n    return (\n      <a href={action.href} className=\"hb-emp-btn\" data-primary={primary} onClick={action.onClick}>\n        {action.label}\n      </a>\n    );\n  }\n  return (\n    <button type=\"button\" className=\"hb-emp-btn\" data-primary={primary} onClick={action.onClick}>\n      {action.label}\n    </button>\n  );\n}\n\nexport function EmptyState({\n  illustration = \"inbox\",\n  title = \"Nothing here yet\",\n  description,\n  primaryAction,\n  secondaryAction,\n  size = \"md\",\n  accent = \"#2f7bff\",\n  className = \"\",\n  style,\n  ...rest\n}: EmptyStateProps) {\n  const Art = illustration === \"none\" ? null : arts[illustration];\n  const vars = { \"--hb-emp-accent\": accent, ...style } as React.CSSProperties;\n  return (\n    <div className={`hb-emp ${className}`} style={vars} data-size={size} {...rest}>\n      <style href=\"hb-empty-state\" precedence=\"default\">{css}</style>\n      {Art && <Art />}\n      <h3 className=\"hb-emp-title\">{title}</h3>\n      {description && <p className=\"hb-emp-desc\">{description}</p>}\n      {(primaryAction || secondaryAction) && (\n        <div className=\"hb-emp-actions\">\n          {primaryAction && <ActionButton action={primaryAction} primary />}\n          {secondaryAction && <ActionButton action={secondaryAction} primary={false} />}\n        </div>\n      )}\n    </div>\n  );\n}\n"
    }
  ]
}