{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A segmented switcher: a tab list whose items (SwitcherItem) share size and layout. Canary handed these down through context; here each item takes the same two props. Arrow keys: attach `moveFocus` to the keydown (horizontal, activate).",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/patterns/switcher.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// SwitcherProps are the props of Switcher; the values are the JSON shapes of the TypeScript props.\ntype SwitcherProps struct {\n\tSize any `json:\"size\"`\n\tLayout any `json:\"layout\"`\n\tLabel any `json:\"label\"`\n\tClass string `json:\"className\"`\n}\n\n// A segmented switcher: a tab list whose items (SwitcherItem) share size and layout. Canary handed these down through context; here each item takes the same two props. Arrow keys: attach `moveFocus` to the keydown (horizontal, activate).\ntempl Switcher(p SwitcherProps) {\n\t{{ vSize := uiutils.Def(p.Size, \"default\") }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"text\") }}\n\t{{ vLabel := p.Label }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(recipeSwitcher.Of(map[string]any{\"size\": vSize, \"layout\": vLayout}), p.Class)), Attrs: uiutils.Attrs(\"role\", \"tablist\", \"aria-label\", vLabel, \"data-slot\", \"switcher\")}}) {\n\t\t{ children... }\n\t}\n}\n",
      "path": "blocks/switcher.templ",
      "target": "blocks/switcher.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "switcher",
  "registryDependencies": [
    "box",
    "kit-box",
    "presets",
    "utils"
  ],
  "runtime": "templ",
  "title": "Switcher",
  "type": "registry:component"
}
