{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"hero-centered","type":"registry:block","title":"Centered hero","description":"An announcement, a big promise and two actions, centered on a glow with a faint grid, and the customers below.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/lib-motion.json","https://dashral.com/r/badge.json","https://dashral.com/r/button.json"],"files":[{"path":"registry/dashral/blocks/hero-centered.tsx","type":"registry:file","target":"components/dashral/blocks/hero-centered.tsx","content":"import { ArrowRight, Hexagon, Layers, Orbit, Play, Triangle, Waves } from \"lucide-react\"\nimport { Badge } from \"../badge\"\nimport { Button } from \"../button\"\nimport { enterMotion, stagger } from \"../lib/motion\"\nimport { cn } from \"../lib/utils\"\n\n/** A button: a link with href, or your handler with onClick. */\nexport type BlockAction = { label: string; href?: string; onClick?: () => void }\n\n// Sample customers, as wordmarks: swap in your customers' logos.\nconst sampleLogos: { name: string; icon?: React.ComponentType<{ className?: string; \"aria-hidden\"?: boolean }>; logo?: React.ReactNode }[] = [\n  { name: \"Northwind\", icon: Waves },\n  { name: \"Lumen\", icon: Hexagon },\n  { name: \"Orbital\", icon: Orbit },\n  { name: \"Stackline\", icon: Layers },\n  { name: \"Apex\", icon: Triangle },\n]\n\n/**\n * A centered hero: an announcement, the promise, two actions and the customers who already use it, on a soft glow\n * of the primary color with a faint grid. Each line arrives a moment after the one before. Every part comes from props.\n */\nexport function HeroCentered({\n  announcement = { label: \"New\", text: \"Scheduled reports are here\", href: \"#\" },\n  title = (\n    <>\n      The dashboard your team <span className=\"text-primary-text\">actually opens</span>\n    </>\n  ),\n  description = \"Revenue, customers and every metric that matters, in one place that updates itself. Set it up in an afternoon, not a quarter.\",\n  primary = { label: \"Get started free\", href: \"#\" },\n  secondary = { label: \"Watch the demo\", href: \"#\" },\n  note = \"Free for 14 days · No credit card needed\",\n  logosTitle = \"Trusted by teams at\",\n  logos = sampleLogos,\n}: {\n  /** The pill above the headline; null hides it. */\n  announcement?: { label: string; text: string; href: string } | null\n  title?: React.ReactNode\n  description?: React.ReactNode\n  primary?: BlockAction\n  /** The second button; null hides it. */\n  secondary?: BlockAction | null\n  /** A line under the buttons; none hides it. */\n  note?: React.ReactNode\n  logosTitle?: string\n  /** Your customers: a name with an icon, or a logo of their own; none hides the row. */\n  logos?: typeof sampleLogos\n}) {\n  return (\n    <section className=\"relative isolate overflow-hidden bg-background px-4 pt-20 pb-16 sm:px-6 sm:pt-28 sm:pb-20\">\n      {/* The glow and the grid, fading out towards the edges. */}\n      <div\n        aria-hidden\n        className=\"absolute inset-x-0 top-0 -z-10 h-[34rem] bg-[radial-gradient(55%_60%_at_50%_0%,color-mix(in_oklch,var(--primary)_22%,transparent),transparent)]\"\n      />\n      <div\n        aria-hidden\n        className=\"absolute inset-0 -z-10 bg-[linear-gradient(to_right,color-mix(in_oklch,var(--foreground)_7%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklch,var(--foreground)_7%,transparent)_1px,transparent_1px)] mask-[radial-gradient(ellipse_60%_50%_at_50%_30%,#000_30%,transparent_80%)] bg-size-[44px_44px]\"\n      />\n\n      <div className=\"mx-auto flex max-w-3xl flex-col items-center text-center\">\n        {announcement && (\n          <a\n            href={announcement.href}\n            className={cn(enterMotion, \"mb-7 inline-flex items-center gap-2 rounded-full border bg-card/70 py-1 ps-1 pe-3 text-xs text-muted-foreground backdrop-blur-sm transition-colors hover:text-foreground\")}\n            style={stagger(0, 80)}\n          >\n            <Badge className=\"rounded-[calc(var(--radius)*11/14)]\">{announcement.label}</Badge>\n            {announcement.text}\n            <ArrowRight className=\"size-3\" aria-hidden />\n          </a>\n        )}\n        <h1\n          className={cn(enterMotion, \"text-4xl leading-[1.05] font-semibold tracking-[-0.04em] text-balance sm:text-6xl\")}\n          style={stagger(1, 80)}\n        >\n          {title}\n        </h1>\n        {description && (\n          <p className={cn(enterMotion, \"mt-6 max-w-xl text-base leading-relaxed text-pretty text-muted-foreground sm:text-lg\")} style={stagger(2, 80)}>\n            {description}\n          </p>\n        )}\n        <div className={cn(enterMotion, \"mt-9 flex flex-wrap justify-center gap-3\")} style={stagger(3, 80)}>\n          <Action action={primary}>\n            {primary.label} <ArrowRight aria-hidden />\n          </Action>\n          {secondary && (\n            <Action action={secondary} variant=\"outline\" className=\"bg-card/60\">\n              <Play aria-hidden /> {secondary.label}\n            </Action>\n          )}\n        </div>\n        {note && (\n          <p className={cn(enterMotion, \"mt-4 text-xs text-muted-foreground\")} style={stagger(4, 80)}>\n            {note}\n          </p>\n        )}\n      </div>\n\n      {logos.length > 0 && (\n        <div className={cn(enterMotion, \"mx-auto mt-16 max-w-4xl\")} style={stagger(5, 80)}>\n          <p className=\"text-center text-xs font-medium tracking-wide text-muted-foreground uppercase\">{logosTitle}</p>\n          <ul className=\"mt-6 flex flex-wrap items-center justify-center gap-x-10 gap-y-5 text-muted-foreground\">\n            {logos.map(({ name, icon: Icon, logo }) => (\n              <li key={name} className=\"flex items-center gap-2 text-lg font-semibold tracking-tight opacity-80 grayscale transition-opacity hover:opacity-100\">\n                {logo ?? (\n                  <>\n                    {Icon && <Icon className=\"size-5\" aria-hidden />}\n                    {name}\n                  </>\n                )}\n              </li>\n            ))}\n          </ul>\n        </div>\n      )}\n    </section>\n  )\n}\n\n/** A large button that follows its action: a link, or a handler. */\nfunction Action({ action, variant, className, children }: { action: BlockAction; variant?: \"outline\"; className?: string; children: React.ReactNode }) {\n  return action.href ? (\n    <Button size=\"lg\" variant={variant} className={className} asChild>\n      <a href={action.href}>{children}</a>\n    </Button>\n  ) : (\n    <Button size=\"lg\" variant={variant} className={className} onClick={action.onClick}>\n      {children}\n    </Button>\n  )\n}\n"}],"cssVars":{"theme":{"color-primary-text":"var(--primary-text, var(--primary))"},"light":{},"dark":{}}}