{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Switch primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by @ui8kit/codegen. DO NOT EDIT.\n    Switch: Switch renders button[type=button][role=switch]; children render the thumb.\n    Props (p): Class (string), Checked (bool), Disabled (bool), ID (string), Name (string), Value (string), AriaLabel (string), AriaLabelledBy (string), Attrs (attrs), Children (children).\n    children: TRUSTED HTML printed with |safe — never pass unescaped user input.\n    Classes without rendering: switch_classes(p) (no asChild in Jinja2). -#}\n<button\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'type') %} type=\"button\"{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'role') %} role=\"switch\"{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-checked') %} aria-checked=\"{{ ui_bool_str(ui_def(p['Checked'], false)) }}\"{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'data-state') %} data-state=\"{{ ui_bool_str(ui_def(p['Checked'], false)) }}\"{%- endif %}\n  {%- with cls = switch_classes(p) %}{%- if cls %} class=\"{{ cls }}\"{%- endif %}{%- endwith %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'disabled') %}{%- if ui_def(p['Disabled'], false) %} disabled{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'id') %}{%- if ui_is_set_str(p['ID']) %} id=\"{{ p['ID'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'name') %}{%- if ui_is_set_str(p['Name']) %} name=\"{{ p['Name'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'value') %}{%- if p['Value'] is defined and p['Value'] is not none %} value=\"{{ p['Value'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-label') %}{%- if ui_is_set_str(p['AriaLabel']) %} aria-label=\"{{ p['AriaLabel'] }}\"{%- endif %}{%- endif %}\n  {%- if not ui_has_attr(ui_def(p['Attrs'], {}), 'aria-labelledby') %}{%- if ui_is_set_str(p['AriaLabelledBy']) %} aria-labelledby=\"{{ p['AriaLabelledBy'] }}\"{%- endif %}{%- endif %}\n  {{ ui_attr_html(ui_def(p['Attrs'], {}), false, ['id', 'name', 'aria-label', 'aria-labelledby']) }}\n>{{ children|default('', true)|safe }}</button>\n",
      "path": "ui/switch/switch.html.j2",
      "target": "ui/switch/switch.html.j2"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "jinja2",
      "primitive"
    ]
  },
  "name": "kit-switch",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Kit Switch",
  "type": "registry:ui"
}
