{
  "name": "stacked-empty-state",
  "type": "registry:component",
  "dependencies": [
    "lucide-react"
  ],
  "files": [
    {
      "type": "registry:component",
      "content": "/**\n * @author: @kokonutui\n * @description: Stacked Empty State\n * @version: 1.0.0\n * @date: 2026-11-28\n * @license: MIT\n * @website: https://kokonutui.com\n * @github: https://github.com/kokonut-labs/kokonutui\n */\n\nimport { type LucideIcon, PenLine } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface StackedEmptyStateProps {\n  /** Drawn on the blue tile of the front card. */\n  icon?: LucideIcon;\n  title?: string;\n  description?: ReactNode;\n  /** Buttons, primary first. Leave out for the demo's two. */\n  actions?: ReactNode;\n  className?: string;\n}\n\nconst BACK_CARD =\n  \"absolute top-4 h-[78px] w-[128px] rounded-xl border border-black/[0.06] bg-zinc-100/80 motion-safe:transition-[rotate,translate] motion-safe:duration-300 motion-safe:ease-out dark:border-white/[0.08] dark:bg-zinc-800/60\";\n\nconst DOT =\n  \"size-4 rounded-full bg-zinc-200 ring-2 ring-white dark:bg-zinc-700 dark:ring-zinc-950\";\n\nconst LINE = \"h-2 rounded-full bg-zinc-100 dark:bg-zinc-800\";\n\n/**\n * A blank post on top of two others, fanned out like one post going to\n * several accounts. The back cards spread a little further on hover.\n */\nfunction StackedCards({ icon: Icon }: { icon: LucideIcon }) {\n  return (\n    <div aria-hidden=\"true\" className=\"relative h-[104px] w-[208px]\">\n      <div\n        className={cn(\n          BACK_CARD,\n          \"left-1 -rotate-6 group-hover/empty:-translate-x-1 group-hover/empty:-rotate-9\"\n        )}\n      />\n      <div\n        className={cn(\n          BACK_CARD,\n          \"right-1 rotate-6 group-hover/empty:translate-x-1 group-hover/empty:rotate-9\"\n        )}\n      />\n      <div className=\"absolute top-0 left-1/2 flex h-[96px] w-[144px] -translate-x-1/2 flex-col justify-between rounded-xl border border-zinc-300 border-dashed bg-white p-3 group-hover/empty:-translate-y-0.5 motion-safe:transition-[translate] motion-safe:duration-300 motion-safe:ease-out dark:border-zinc-700 dark:bg-zinc-950\">\n        <div className=\"flex items-center justify-between\">\n          <span className=\"flex size-8 items-center justify-center rounded-lg bg-blue-600 text-white dark:bg-blue-500\">\n            <Icon className=\"size-4\" strokeWidth={2.5} />\n          </span>\n          <span className=\"flex -space-x-1.5\">\n            <span className={DOT} />\n            <span className={DOT} />\n            <span className={DOT} />\n          </span>\n        </div>\n        <div className=\"flex flex-col gap-1.5\">\n          <span className={cn(LINE, \"w-20\")} />\n          <span className={cn(LINE, \"w-12\")} />\n        </div>\n      </div>\n    </div>\n  );\n}\n\nfunction DemoActions() {\n  return (\n    <>\n      <button\n        className=\"h-9 rounded-full bg-blue-600 px-4 font-medium text-[13px] text-white shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(29_78_216/0.35)] outline-hidden transition-[background-color,scale] duration-150 ease-out hover:bg-blue-700 focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:ring-offset-2 active:scale-[0.97] dark:bg-blue-500 dark:focus-visible:ring-offset-zinc-950 dark:hover:bg-blue-600\"\n        type=\"button\"\n      >\n        New post\n      </button>\n      <button\n        className=\"h-9 rounded-full px-4 font-medium text-[13px] text-zinc-700 outline-hidden ring-1 ring-black/[0.08] transition-[background-color,scale] duration-150 ease-out hover:bg-zinc-50 focus-visible:ring-2 focus-visible:ring-blue-500/50 active:scale-[0.97] dark:text-zinc-200 dark:ring-white/10 dark:hover:bg-white/[0.05]\"\n        type=\"button\"\n      >\n        Write a draft\n      </button>\n    </>\n  );\n}\n\n/** The stacked-card drawing, a title, one line of copy and the actions. */\nexport default function StackedEmptyState({\n  icon = PenLine,\n  title = \"No posts yet\",\n  description = \"Write one post and send it to every account you connect.\",\n  actions,\n  className,\n}: StackedEmptyStateProps) {\n  return (\n    <div\n      className={cn(\n        \"group/empty flex flex-col items-center justify-center px-4 text-center\",\n        className\n      )}\n    >\n      <StackedCards icon={icon} />\n      <p className=\"mt-5 font-medium text-[15px] text-zinc-900 dark:text-zinc-100\">\n        {title}\n      </p>\n      <p className=\"mt-1 max-w-sm text-balance text-[13.5px] text-zinc-500 dark:text-zinc-400\">\n        {description}\n      </p>\n      {actions === null ? null : (\n        <div className=\"mt-5 flex items-center gap-2\">\n          {actions === undefined ? <DemoActions /> : actions}\n        </div>\n      )}\n    </div>\n  );\n}\n",
      "path": "/components/kokonutui/stacked-empty-state.tsx",
      "target": "components/kokonutui/stacked-empty-state.tsx"
    }
  ]
}