{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-01",
  "title": "Newsletter — Signup",
  "author": "SAASTRO <https://saastro.io>",
  "description": "Email newsletter signup section with input and submit button. Zero-JS Astro component.",
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/blocks/newsletter-01.astro",
      "content": "---\n/**\n * newsletter-01 — Alta de newsletter con input y botón.\n * Bloque Astro puro con FORM NATIVO: cero JS, cero dependencias, y funciona\n * sin JavaScript en el navegador. Antes era React con un handler `onSubmit`\n * por props — una función no cruza la frontera de island/adapter, así que en\n * la práctica era inutilizable desde Astro. Ahora el submit es `action` +\n * `method` estándar (apunta a tu endpoint: Astro Action, worker, Formspree…).\n */\ninterface Props {\n  title?: string;\n  description?: string;\n  placeholder?: string;\n  buttonText?: string;\n  /** Endpoint del submit nativo. Sin él, el form no navega (útil en demos). */\n  action?: string;\n  method?: 'get' | 'post';\n  class?: string;\n}\nconst {\n  title = 'Stay up to date',\n  description = 'Subscribe to our newsletter for the latest updates.',\n  placeholder = 'Enter your email',\n  buttonText = 'Subscribe',\n  action,\n  method = 'post',\n  class: className,\n} = Astro.props;\n\nconst inputCls =\n  'flex h-9 w-full flex-1 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 md:text-sm';\nconst btnCls =\n  'inline-flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-transparent bg-primary px-2.5 text-sm font-medium whitespace-nowrap text-primary-foreground transition-all outline-none select-none hover:bg-primary/80 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px';\n---\n\n<section class:list={['w-full px-6 py-24 md:py-32', className]}>\n  <div class=\"mx-auto max-w-xl text-center\">\n    <h2 class=\"text-3xl font-bold tracking-tight sm:text-4xl\">{title}</h2>\n    <p class=\"mt-4 text-muted-foreground\">{description}</p>\n    <form action={action} method={action ? method : undefined} class=\"mt-8 flex gap-3\">\n      <input type=\"email\" name=\"email\" placeholder={placeholder} required class={inputCls} />\n      <button type=\"submit\" class={btnCls}>{buttonText}</button>\n    </form>\n    <p class=\"mt-3 text-xs text-muted-foreground\">No spam. Unsubscribe at any time.</p>\n  </div>\n</section>\n",
      "type": "registry:component",
      "target": "@components/blocks/newsletter-01.astro"
    }
  ],
  "meta": {
    "group": "CTA",
    "iframeHeight": "480px"
  },
  "docs": "Astro component — zero JS, NATIVE form submit (works without JavaScript). Default import: `import Newsletter01 from '@/components/blocks/newsletter-01.astro'`. Props: title?, description?, placeholder?, buttonText?, action? (submit endpoint), method?, class?.",
  "categories": [
    "newsletter",
    "cta"
  ],
  "type": "registry:block"
}