{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "local-menu-board",
  "type": "registry:component",
  "title": "Local Menu Board",
  "description": "A restaurant menu with tabs for each course, dotted price leaders and a featured dish card with an illustrated plate.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "local",
    "menu",
    "restaurant",
    "tabs",
    "food",
    "prices",
    "cafe"
  ],
  "docs": "https://hyperblur.dev/effects/local-menu-board",
  "files": [
    {
      "path": "registry/hyperblur/local-menu-board.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/local-menu-board.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LocalMenuDish {\n  name: string;\n  description: string;\n  price: string;\n  tags?: string[];\n}\n\nexport interface LocalMenuSection {\n  id: string;\n  label: string;\n  note?: string;\n  dishes: LocalMenuDish[];\n  featured?: LocalMenuDish;\n}\n\nexport interface LocalMenuBoardProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\" | \"onChange\" | \"defaultValue\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  sections?: LocalMenuSection[];\n  value?: string;\n  defaultValue?: string;\n  onChange?: (id: string) => void;\n  cta?: { label: string; href: string };\n  accent?: string;\n}\n\nconst defaultSections: LocalMenuSection[] = [\n  {\n    id: \"starters\",\n    label: \"Starters\",\n    note: \"Served from 5 pm\",\n    dishes: [\n      { name: \"Charred leeks\", description: \"Romesco, toasted hazelnut, aged sherry vinegar\", price: \"14\", tags: [\"V\"] },\n      { name: \"Burrata and stone fruit\", description: \"Grilled peach, basil oil, Maldon salt, sourdough\", price: \"18\", tags: [\"V\"] },\n      { name: \"Crispy squid\", description: \"Lemon aioli, pickled chili, fennel pollen\", price: \"16\" },\n      { name: \"Beef tartare\", description: \"Smoked egg yolk, capers, shallot, potato crisps\", price: \"19\" },\n    ],\n    featured: { name: \"Wood-fired flatbread\", description: \"Whipped ricotta, hot honey, Calabrian chili and wild oregano, baked to order in our oak oven.\", price: \"15\", tags: [\"Chef's pick\"] },\n  },\n  {\n    id: \"mains\",\n    label: \"Mains\",\n    note: \"All mains come with house focaccia\",\n    dishes: [\n      { name: \"Hand-cut pappardelle\", description: \"Slow-braised short rib ragu, parmigiano, gremolata\", price: \"29\" },\n      { name: \"Half roast chicken\", description: \"Salsa verde, charred lemon, crispy potatoes\", price: \"32\" },\n      { name: \"Market fish\", description: \"Brown butter, capers, spring peas, mint\", price: \"36\" },\n      { name: \"Wild mushroom risotto\", description: \"Carnaroli rice, thyme, pecorino, truffle oil\", price: \"27\", tags: [\"V\"] },\n    ],\n    featured: { name: \"Dry-aged ribeye for two\", description: \"Twenty-eight day aged, grilled over oak, with bone marrow butter and a crisp leaf salad.\", price: \"96\", tags: [\"For sharing\"] },\n  },\n  {\n    id: \"desserts\",\n    label: \"Desserts\",\n    note: \"Made in house every morning\",\n    dishes: [\n      { name: \"Olive oil cake\", description: \"Blood orange, crème fraîche, pistachio\", price: \"12\", tags: [\"V\"] },\n      { name: \"Dark chocolate pot\", description: \"Sea salt caramel, cocoa nib tuile\", price: \"13\", tags: [\"GF\"] },\n      { name: \"Affogato\", description: \"Fior di latte gelato, double espresso\", price: \"9\" },\n      { name: \"Cheese plate\", description: \"Three local cheeses, quince paste, oat crackers\", price: \"18\" },\n    ],\n    featured: { name: \"Basque cheesecake\", description: \"Burnt on top, barely set in the middle, served with macerated cherries and a spoon of cream.\", price: \"13\", tags: [\"Most ordered\"] },\n  },\n  {\n    id: \"drinks\",\n    label: \"Drinks\",\n    note: \"Ask about our natural wine list\",\n    dishes: [\n      { name: \"Terracotta spritz\", description: \"Aperitivo, blood orange, prosecco, soda\", price: \"14\" },\n      { name: \"Smoked negroni\", description: \"Gin, vermouth, bitter, oak smoke\", price: \"16\" },\n      { name: \"House red, by the glass\", description: \"Montepulciano d'Abruzzo, juicy and soft\", price: \"12\" },\n      { name: \"Sparkling lemonade\", description: \"Meyer lemon, rosemary, sparkling water\", price: \"7\", tags: [\"0%\"] },\n    ],\n    featured: { name: \"Bottle of the week\", description: \"A skin-contact Ribolla Gialla from Friuli, amber and bright, chosen by our sommelier Lucia.\", price: \"58\", tags: [\"Limited\"] },\n  },\n];\n\nconst css = `\n.hb-kl2 {\n  --hb-kl2-accent: #c4572f;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  position: relative;\n  background: #f6efe3;\n  background-image: radial-gradient(rgba(120, 72, 40, .07) 1px, transparent 1px);\n  background-size: 18px 18px;\n  color: #2d1e15;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kl2 *, .hb-kl2 *::before, .hb-kl2 *::after { box-sizing: border-box; }\n.hb-kl2-wrap { max-width: 1120px; margin: 0 auto; padding: 88px 24px 100px; }\n.hb-kl2-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 36px; flex-wrap: wrap; }\n.hb-kl2-eyebrow { margin: 0 0 12px; color: var(--hb-kl2-accent); font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }\n.hb-kl2-title { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-weight: 400; font-size: clamp(40px, 6cqw, 68px); line-height: .98; letter-spacing: -.02em; color: #2a1a10; }\n.hb-kl2-title em { font-style: normal; color: var(--hb-kl2-accent); }\n.hb-kl2-sub { margin: 14px 0 0; max-width: 420px; color: #6e5646; font-size: 16px; line-height: 1.6; }\n.hb-kl2-tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: 999px; background: #efe4d3; border: 1px solid #e3d3bc; max-width: 100%; overflow-x: auto; scrollbar-width: none; }\n.hb-kl2-tab {\n  position: relative;\n  flex: none;\n  padding: 10px 18px;\n  border: 0;\n  border-radius: 999px;\n  background: transparent;\n  color: #7a6150;\n  font: inherit;\n  font-size: 14.5px;\n  font-weight: 500;\n  cursor: pointer;\n  transition: background .25s, color .25s, box-shadow .25s;\n}\n.hb-kl2-tab:hover { color: #2d1e15; }\n.hb-kl2-tab[aria-selected=\"true\"] { background: #fffaf1; color: #2d1e15; box-shadow: 0 1px 2px rgba(80, 40, 10, .12), 0 6px 14px -8px rgba(80, 40, 10, .3); }\n.hb-kl2-tab:focus-visible, .hb-kl2-cta:focus-visible { outline: 2px solid var(--hb-kl2-accent); outline-offset: 2px; }\n.hb-kl2-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 40px; align-items: start; }\n.hb-kl2-panel { min-width: 0; }\n.hb-kl2-note { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: #8a705e; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: 17px; }\n.hb-kl2-note::after { content: \"\"; flex: 1; height: 1px; background: #e0cfb7; }\n.hb-kl2-list { margin: 0; padding: 0; list-style: none; }\n.hb-kl2-item { padding: 18px 0; border-bottom: 1px solid #e8dac6; animation: hb-kl2-in .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--hb-kl2-i) * 70ms); }\n@keyframes hb-kl2-in { from { opacity: 0; transform: translateY(10px); } }\n.hb-kl2-row { display: flex; align-items: baseline; gap: 10px; }\n.hb-kl2-name { font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: 23px; line-height: 1.2; color: #2a1a10; }\n.hb-kl2-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border: 1px solid #d9c3a6; border-radius: 999px; color: #8a6a4f; font-family: inherit; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; vertical-align: 4px; }\n.hb-kl2-leader { flex: 1; min-width: 20px; border-bottom: 2px dotted #cdb79b; transform: translateY(-5px); }\n.hb-kl2-price { font-variant-numeric: tabular-nums; font-size: 17px; font-weight: 600; color: #2a1a10; }\n.hb-kl2-price small { color: var(--hb-kl2-accent); font-size: 13px; margin-right: 1px; }\n.hb-kl2-desc { margin: 4px 0 0; color: #7a6150; font-size: 14.5px; line-height: 1.5; }\n.hb-kl2-feature {\n  position: relative;\n  min-width: 0;\n  padding: 28px;\n  border-radius: 28px;\n  background: linear-gradient(160deg, #fffaf1 0%, #f9ecd9 100%);\n  border: 1px solid #ead8bf;\n  box-shadow: 0 30px 60px -36px rgba(110, 50, 20, .45);\n  overflow: hidden;\n  animation: hb-kl2-in .6s cubic-bezier(.2,.8,.2,1) both;\n}\n.hb-kl2-plate { display: block; width: 100%; max-width: 300px; margin: 0 auto 6px; aspect-ratio: 1; }\n.hb-kl2-spin { transform-origin: 120px 120px; animation: hb-kl2-turn 40s linear infinite; }\n@keyframes hb-kl2-turn { to { transform: rotate(360deg); } }\n.hb-kl2-ribbon { display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: var(--hb-kl2-accent); color: #fff8ef; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }\n.hb-kl2-fname { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-weight: 400; font-size: 30px; line-height: 1.1; color: #2a1a10; }\n.hb-kl2-fdesc { margin: 10px 0 0; color: #6e5646; font-size: 15px; line-height: 1.55; }\n.hb-kl2-ffoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }\n.hb-kl2-fprice { font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); font-size: 34px; color: var(--hb-kl2-accent); }\n.hb-kl2-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: #2a1a10; color: #fff8ef; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, transform .2s; }\n.hb-kl2-cta:hover { background: var(--hb-kl2-accent); transform: translateY(-1px); }\n@container (max-width: 820px) {\n  .hb-kl2-body { grid-template-columns: minmax(0, 1fr); }\n  .hb-kl2-wrap { padding: 64px 20px 72px; }\n}\n@container (max-width: 420px) {\n  .hb-kl2-name { font-size: 20px; }\n  .hb-kl2-feature { padding: 20px; }\n  .hb-kl2-tab { padding: 9px 13px; font-size: 13.5px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kl2 *, .hb-kl2 *::before, .hb-kl2 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nfunction Plate({ accent }: { accent: string }) {\n  const leaves = Array.from({ length: 9 }, (_, i) => {\n    const a = (i / 9) * Math.PI * 2;\n    const r = 34 + ((i * 37) % 13);\n    return { x: (120 + Math.cos(a) * r).toFixed(2), y: (120 + Math.sin(a) * r).toFixed(2), rot: ((a * 180) / Math.PI).toFixed(1) };\n  });\n  return (\n    <svg className=\"hb-kl2-plate\" viewBox=\"0 0 240 240\" aria-hidden=\"true\">\n      <defs>\n        <radialGradient id=\"hb-kl2-rim\" cx=\"50%\" cy=\"45%\" r=\"55%\">\n          <stop offset=\"0%\" stopColor=\"#ffffff\" />\n          <stop offset=\"80%\" stopColor=\"#f3e6d3\" />\n          <stop offset=\"100%\" stopColor=\"#e2cdb0\" />\n        </radialGradient>\n      </defs>\n      <ellipse cx=\"124\" cy=\"132\" rx=\"100\" ry=\"96\" fill=\"rgba(90,45,15,.12)\" />\n      <circle cx=\"120\" cy=\"120\" r=\"100\" fill=\"url(#hb-kl2-rim)\" stroke=\"#e5d2b8\" />\n      <circle cx=\"120\" cy=\"120\" r=\"74\" fill=\"#fffaf2\" stroke=\"#efe0ca\" />\n      <g className=\"hb-kl2-spin\">\n        <circle cx=\"120\" cy=\"120\" r=\"88\" fill=\"none\" stroke={accent} strokeOpacity=\".35\" strokeWidth=\"1\" strokeDasharray=\"2 6\" />\n        <circle cx=\"120\" cy=\"120\" r=\"46\" fill={accent} fillOpacity=\".16\" />\n        <path d=\"M84 126c10-26 62-34 74-4-10 22-60 28-74 4z\" fill={accent} fillOpacity=\".85\" />\n        <path d=\"M92 124c14-12 42-14 58-2\" stroke=\"#fff4e6\" strokeWidth=\"2\" fill=\"none\" strokeLinecap=\"round\" opacity=\".7\" />\n        <circle cx=\"104\" cy=\"104\" r=\"7\" fill=\"#f2c94c\" />\n        <circle cx=\"140\" cy=\"140\" r=\"5\" fill=\"#f2c94c\" opacity=\".85\" />\n        {leaves.map((l, i) => (\n          <ellipse key={i} cx={l.x} cy={l.y} rx=\"6\" ry=\"2.6\" fill=\"#5f7d3a\" transform={`rotate(${l.rot} ${l.x} ${l.y})`} opacity={i % 2 ? 0.75 : 1} />\n        ))}\n      </g>\n    </svg>\n  );\n}\n\nexport function LocalMenuBoard({\n  eyebrow = \"Osteria Rosa · Carroll Gardens\",\n  title = \"Tonight's menu\",\n  subtitle = \"Seasonal Italian cooking over an oak fire. Our menu changes with the market, so ask what came in this morning.\",\n  sections = defaultSections,\n  value,\n  defaultValue,\n  onChange,\n  cta = { label: \"Reserve a table\", href: \"#reserve\" },\n  accent = \"#c4572f\",\n  className,\n  style,\n  ...rest\n}: LocalMenuBoardProps) {\n  const uid = React.useId();\n  const [inner, setInner] = React.useState(defaultValue ?? sections[0]?.id ?? \"\");\n  const current = value ?? inner;\n  const active = sections.find((s) => s.id === current) ?? sections[0];\n  const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([]);\n\n  const select = (id: string) => {\n    if (value === undefined) setInner(id);\n    onChange?.(id);\n  };\n\n  const onKey = (event: React.KeyboardEvent, index: number) => {\n    let next = -1;\n    if (event.key === \"ArrowRight\") next = (index + 1) % sections.length;\n    if (event.key === \"ArrowLeft\") next = (index - 1 + sections.length) % sections.length;\n    if (event.key === \"Home\") next = 0;\n    if (event.key === \"End\") next = sections.length - 1;\n    if (next < 0) return;\n    event.preventDefault();\n    select(sections[next].id);\n    tabRefs.current[next]?.focus();\n  };\n\n  const words = title.split(\" \");\n  const last = words.pop();\n\n  return (\n    <section\n      className={[\"hb-kl2\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-kl2-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-local-menu-board\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kl2-wrap\">\n        <div className=\"hb-kl2-head\">\n          <div>\n            <p className=\"hb-kl2-eyebrow\">{eyebrow}</p>\n            <h2 className=\"hb-kl2-title\">{words.join(\" \")} <em>{last}</em></h2>\n            <p className=\"hb-kl2-sub\">{subtitle}</p>\n          </div>\n          <div className=\"hb-kl2-tabs\" role=\"tablist\" aria-label=\"Menu sections\">\n            {sections.map((s, i) => (\n              <button\n                key={s.id}\n                ref={(el) => { tabRefs.current[i] = el; }}\n                type=\"button\"\n                role=\"tab\"\n                id={`${uid}-tab-${s.id}`}\n                aria-controls={`${uid}-panel`}\n                aria-selected={s.id === active?.id}\n                tabIndex={s.id === active?.id ? 0 : -1}\n                className=\"hb-kl2-tab\"\n                onClick={() => select(s.id)}\n                onKeyDown={(e) => onKey(e, i)}\n              >\n                {s.label}\n              </button>\n            ))}\n          </div>\n        </div>\n        {active ? (\n          <div className=\"hb-kl2-body\" key={active.id}>\n            <div className=\"hb-kl2-panel\" role=\"tabpanel\" id={`${uid}-panel`} aria-labelledby={`${uid}-tab-${active.id}`}>\n              {active.note ? <p className=\"hb-kl2-note\">{active.note}</p> : null}\n              <ul className=\"hb-kl2-list\">\n                {active.dishes.map((d, i) => (\n                  <li key={d.name} className=\"hb-kl2-item\" style={{ \"--hb-kl2-i\": i } as React.CSSProperties}>\n                    <div className=\"hb-kl2-row\">\n                      <span className=\"hb-kl2-name\">\n                        {d.name}\n                        {d.tags?.map((t) => <span key={t} className=\"hb-kl2-tag\">{t}</span>)}\n                      </span>\n                      <span className=\"hb-kl2-leader\" aria-hidden=\"true\" />\n                      <span className=\"hb-kl2-price\"><small>$</small>{d.price}</span>\n                    </div>\n                    <p className=\"hb-kl2-desc\">{d.description}</p>\n                  </li>\n                ))}\n              </ul>\n            </div>\n            {active.featured ? (\n              <aside className=\"hb-kl2-feature\" aria-label=\"Featured dish\">\n                <Plate accent={accent} />\n                {active.featured.tags?.[0] ? <span className=\"hb-kl2-ribbon\">{active.featured.tags[0]}</span> : null}\n                <h3 className=\"hb-kl2-fname\">{active.featured.name}</h3>\n                <p className=\"hb-kl2-fdesc\">{active.featured.description}</p>\n                <div className=\"hb-kl2-ffoot\">\n                  <span className=\"hb-kl2-fprice\">${active.featured.price}</span>\n                  {cta ? (\n                    <a className=\"hb-kl2-cta\" href={cta.href}>\n                      {cta.label}\n                      <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                        <path d=\"M5 12h14M13 6l6 6-6 6\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n                      </svg>\n                    </a>\n                  ) : null}\n                </div>\n              </aside>\n            ) : null}\n          </div>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}