{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "menu-01",
  "title": "Restaurant Menu",
  "author": "VenusUI",
  "description": "A menu by course where the photo follows the dish you point at or focus.",
  "registryDependencies": [
    "tabs"
  ],
  "files": [
    {
      "path": "registry/default/blocks/menu-01/components/menu-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n\n// Photos: Unsplash (free under the Unsplash License). The restaurant is made up.\nconst photo = (id: string) => `https://images.unsplash.com/photo-${id}?w=800&h=1000&fit=crop&auto=format&q=75`\n\ninterface Dish {\n  name: string\n  detail: string\n  price: number\n  image: string\n  alt: string\n  tag?: string\n}\n\nconst menu: { id: string; course: string; dishes: Dish[] }[] = [\n  {\n    id: \"start\",\n    course: \"To start\",\n    dishes: [\n      { name: \"Roast squash soup\", detail: \"Brown butter, toasted seeds, sour cream\", price: 11, image: photo(\"1476718406336-bb5a9690ee2a\"), alt: \"A bowl of orange soup topped with seeds\", tag: \"V\" },\n      { name: \"Garden bowl\", detail: \"Heritage tomato, chickpeas, avocado, sweet potato\", price: 13, image: photo(\"1512621776951-a57141f2eefd\"), alt: \"A colourful bowl of vegetables, chickpeas and avocado\", tag: \"VG\" },\n      { name: \"Market salad\", detail: \"Bitter leaves, radish, pickled onion, seeds\", price: 12, image: photo(\"1540189549336-e6e99c3679fe\"), alt: \"A dark plate of mixed salad\", tag: \"VG\" },\n    ],\n  },\n  {\n    id: \"mains\",\n    course: \"Mains\",\n    dishes: [\n      { name: \"Prawn spaghetti\", detail: \"Chilli, cherry tomato, shellfish butter\", price: 26, image: photo(\"1563379926898-05f4575a45d8\"), alt: \"A pan of spaghetti with prawns and tomatoes\" },\n      { name: \"Slow ragù penne\", detail: \"Twelve-hour beef shin, aged parmesan\", price: 23, image: photo(\"1621996346565-e3dbc646d9a9\"), alt: \"A white plate of penne in meat sauce\" },\n      { name: \"Wood-fired pizza\", detail: \"Fior di latte, red onion, wild herbs\", price: 19, image: photo(\"1565299624946-b28f40a0ae38\"), alt: \"A pizza with herbs on a wooden board\", tag: \"V\" },\n      { name: \"Coconut fish curry\", detail: \"Tamarind, curry leaf, steamed rice\", price: 25, image: photo(\"1455619452474-d2be8b1e70cd\"), alt: \"A bowl of red curry with basil\" },\n    ],\n  },\n  {\n    id: \"sweet\",\n    course: \"Sweet\",\n    dishes: [\n      { name: \"Buttermilk pancakes\", detail: \"Banana, maple, salted butter\", price: 10, image: photo(\"1567620905732-2d1ec7ab7445\"), alt: \"A stack of pancakes with syrup being poured\", tag: \"V\" },\n      { name: \"Brioche french toast\", detail: \"Blueberries, caramelised banana\", price: 11, image: photo(\"1484723091739-30a097e8f929\"), alt: \"French toast with banana and blueberries\", tag: \"V\" },\n    ],\n  },\n]\n\n/** A restaurant menu by course; the photo follows the dish you point at or focus. */\nexport function Menu01() {\n  const [active, setActive] = React.useState(menu[0].dishes[0])\n\n  return (\n    <section aria-labelledby=\"menu-01-title\" className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto grid max-w-6xl gap-10 px-4 sm:px-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,24rem)] lg:gap-16\">\n        <div>\n          <p className=\"text-sm text-muted-foreground\">Osteria Lume · Dinner</p>\n          <h2 id=\"menu-01-title\" className=\"mt-2 font-serif text-4xl font-semibold tracking-tight sm:text-5xl\">\n            Tonight’s menu\n          </h2>\n          <Tabs defaultValue={menu[0].id} onValueChange={(id) => setActive(menu.find((section) => section.id === id)!.dishes[0])} className=\"mt-8 gap-6\">\n            <TabsList variant=\"line\">\n              {menu.map((section) => (\n                <TabsTrigger key={section.id} value={section.id}>\n                  {section.course}\n                </TabsTrigger>\n              ))}\n            </TabsList>\n            {menu.map((section) => (\n              <TabsContent key={section.id} value={section.id}>\n                <ul className=\"space-y-1\">\n                  {section.dishes.map((dish) => (\n                    <li key={dish.name}>\n                      <button\n                        type=\"button\"\n                        aria-pressed={active.name === dish.name}\n                        onClick={() => setActive(dish)}\n                        onPointerEnter={() => setActive(dish)}\n                        onFocus={() => setActive(dish)}\n                        className=\"group w-full rounded-lg px-3 py-3 text-left outline-none transition-colors hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50 aria-pressed:bg-muted\"\n                      >\n                        <span className=\"flex items-baseline gap-2\">\n                          <span className=\"font-medium\">{dish.name}</span>\n                          {dish.tag ? <span className=\"text-[10px] font-semibold text-muted-foreground group-aria-pressed:text-foreground/80\">{dish.tag}</span> : null}\n                          <span aria-hidden=\"true\" className=\"mb-1 min-w-6 flex-1 border-b border-dotted border-muted-foreground/50\" />\n                          <span className=\"font-mono text-sm tabular-nums\">${dish.price}</span>\n                        </span>\n                        <span className=\"mt-0.5 block text-sm text-muted-foreground group-aria-pressed:text-foreground/80\">{dish.detail}</span>\n                      </button>\n                    </li>\n                  ))}\n                </ul>\n              </TabsContent>\n            ))}\n          </Tabs>\n          <p className=\"mt-6 px-3 text-xs text-muted-foreground\">V vegetarian · VG vegan. Please tell us about any allergies.</p>\n        </div>\n        <figure className=\"max-lg:order-first lg:sticky lg:top-24 lg:self-start\">\n          <img key={active.image} src={active.image} alt={active.alt} className=\"aspect-[4/3] w-full rounded-2xl bg-muted object-cover lg:aspect-[4/5]\" />\n          <figcaption aria-live=\"polite\" className=\"mt-3 text-sm text-muted-foreground\">\n            {active.name}\n          </figcaption>\n        </figure>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "content"
  ],
  "type": "registry:block"
}