{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "invitation-01",
  "title": "Invitation & RSVP",
  "author": "VenusUI",
  "description": "An invitation with an opening envelope, the day's schedule, the venue and a working RSVP form.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input",
    "https://venusui.com/r/envelope.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/invitation-01/components/invitation-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Check, MapPin } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { Input } from \"@/components/ui/input\"\nimport { Envelope } from \"@/registry/default/ui/envelope\"\n\n// Photo: Unsplash (free under the Unsplash License). The couple and venue are made up.\nconst VENUE = \"https://images.unsplash.com/photo-1501785888041-af3ef285b470?w=1000&h=560&fit=crop&auto=format&q=75\"\n\nconst schedule = [\n  { time: \"16:00\", title: \"Ceremony\", place: \"On the jetty\" },\n  { time: \"17:30\", title: \"Drinks & lawn games\", place: \"Boathouse garden\" },\n  { time: \"19:00\", title: \"Dinner\", place: \"The long table\" },\n  { time: \"21:00\", title: \"Dancing\", place: \"Until late\" },\n]\n\n/** A wedding or event invitation: the envelope, the day's details and an RSVP form. */\nexport function Invitation01() {\n  const [attending, setAttending] = React.useState<\"yes\" | \"no\">(\"yes\")\n  const [sent, setSent] = React.useState<string | null>(null)\n  const id = React.useId()\n\n  return (\n    <section aria-labelledby={`${id}-title`} className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto max-w-6xl px-4 sm:px-6\">\n        <div className=\"mx-auto max-w-2xl text-center\">\n          <p className=\"font-serif text-sm tracking-[0.25em] text-rose-700 uppercase dark:text-rose-300\">Save the date</p>\n          <h2 id={`${id}-title`} className=\"mt-3 font-serif text-4xl tracking-tight sm:text-5xl\">\n            Maya &amp; Theo\n          </h2>\n          <p className=\"mt-3 text-muted-foreground\">Saturday 12 September 2026 · The Old Boathouse, Lake Linden</p>\n        </div>\n\n        <div className=\"mt-16 grid items-start gap-14 lg:grid-cols-2\">\n          <div className=\"flex justify-center lg:pt-8\">\n            <Envelope defaultOpen label=\"Invitation from Maya and Theo\" to=\"For you\" className=\"w-[min(24rem,calc(100vw-3rem))]\">\n              <p className=\"text-[10px] font-semibold tracking-[0.2em] text-rose-700 uppercase\">You’re invited</p>\n              <p className=\"mt-2 font-serif text-xl leading-tight\">Come celebrate with us by the lake</p>\n              <p className=\"mt-2 text-xs leading-5 text-neutral-600\">\n                Ceremony at 4 pm, then dinner and dancing until late. Dress code: garden party.\n              </p>\n            </Envelope>\n          </div>\n\n          <div className=\"space-y-8\">\n            <figure className=\"overflow-hidden rounded-2xl border bg-card\">\n              <img src={VENUE} alt=\"Rowing boats on a turquoise lake below mountains\" className=\"aspect-[16/9] w-full object-cover\" />\n              <figcaption className=\"flex items-start gap-2 p-4 text-sm text-muted-foreground\">\n                <MapPin aria-hidden=\"true\" className=\"mt-0.5 size-4 shrink-0\" />\n                The Old Boathouse, Lake Linden. Free parking on site; a shuttle runs from the station from 14:30.\n              </figcaption>\n            </figure>\n\n            <ol className=\"grid gap-3 sm:grid-cols-2\">\n              {schedule.map((item) => (\n                <li key={item.title} className=\"rounded-xl border bg-card p-4\">\n                  <p className=\"font-mono text-xs text-muted-foreground tabular-nums\">{item.time}</p>\n                  <p className=\"mt-1 font-medium\">{item.title}</p>\n                  <p className=\"text-sm text-muted-foreground\">{item.place}</p>\n                </li>\n              ))}\n            </ol>\n\n            <div className=\"rounded-2xl border bg-card p-6\">\n              <h3 className=\"font-serif text-2xl\">RSVP</h3>\n              {sent ? (\n                <p role=\"status\" className=\"mt-4 flex items-start gap-3 text-sm\">\n                  <span className=\"grid size-7 shrink-0 place-items-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400\">\n                    <Check aria-hidden=\"true\" className=\"size-4\" />\n                  </span>\n                  {attending === \"yes\"\n                    ? `Thank you, ${sent}! We can’t wait to celebrate with you. Details are on their way to your inbox.`\n                    : `Thank you for letting us know, ${sent}. You’ll be missed!`}\n                </p>\n              ) : (\n                <form\n                  className=\"mt-4 grid gap-4\"\n                  onSubmit={(event) => {\n                    event.preventDefault()\n                    const name = new FormData(event.currentTarget).get(\"name\")\n                    setSent(String(name).split(\" \")[0] || \"friend\")\n                  }}\n                >\n                  <p className=\"-mt-2 text-sm text-muted-foreground\">Kindly reply by 1 August.</p>\n                  <div className=\"grid gap-4 sm:grid-cols-2\">\n                    <label className=\"grid gap-1.5 text-sm font-medium\">\n                      Full name\n                      <Input name=\"name\" required autoComplete=\"name\" />\n                    </label>\n                    <label className=\"grid gap-1.5 text-sm font-medium\">\n                      Email\n                      <Input name=\"email\" type=\"email\" required autoComplete=\"email\" />\n                    </label>\n                  </div>\n                  <fieldset className=\"grid gap-2\">\n                    <legend className=\"text-sm font-medium\">Will you be there?</legend>\n                    <div className=\"grid gap-2 sm:grid-cols-2\">\n                      {(\n                        [\n                          [\"yes\", \"Joyfully accepts\"],\n                          [\"no\", \"Regretfully declines\"],\n                        ] as const\n                      ).map(([value, text]) => (\n                        <label\n                          key={value}\n                          className=\"flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-2 text-sm has-checked:border-foreground/40 has-checked:bg-muted has-focus-visible:ring-3 has-focus-visible:ring-ring/50\"\n                        >\n                          <input type=\"radio\" name=\"attending\" value={value} checked={attending === value} onChange={() => setAttending(value)} className=\"accent-foreground\" />\n                          {text}\n                        </label>\n                      ))}\n                    </div>\n                  </fieldset>\n                  {attending === \"yes\" ? (\n                    <div className=\"grid gap-4 sm:grid-cols-[8rem_minmax(0,1fr)]\">\n                      <label className=\"grid gap-1.5 text-sm font-medium\">\n                        Guests\n                        <select\n                          name=\"guests\"\n                          defaultValue=\"1\"\n                          className=\"h-8 rounded-lg border border-input bg-transparent px-2 text-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30\"\n                        >\n                          {[1, 2, 3, 4].map((n) => (\n                            <option key={n} value={n}>\n                              {n}\n                            </option>\n                          ))}\n                        </select>\n                      </label>\n                      <label className=\"grid gap-1.5 text-sm font-medium\">\n                        Dietary needs <span className=\"sr-only\">(optional)</span>\n                        <Input name=\"diet\" placeholder=\"Optional, e.g. vegetarian\" />\n                      </label>\n                    </div>\n                  ) : null}\n                  <Button type=\"submit\" className=\"justify-self-start\">\n                    Send RSVP\n                  </Button>\n                </form>\n              )}\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "contact",
    "content"
  ],
  "type": "registry:block"
}