{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "One icon-only tab (28 by 28, a 16 px glyph in the children). `label` is its accessible name. Arrow-key movement between tabs is the job of IconTabs (see roving).",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * One icon-only tab (28 by 28, a 16 px glyph in the children). `label` is its accessible name. Arrow-key\n * movement between tabs is the job of IconTabs (see roving).\n */\nimport { type ReactNode } from \"react\";\nimport { ButtonPlain } from \"../compose\";\nimport { cn, variants } from \"../utils\";\n\n/** IconTab: the classes of each value (shadcn/cva style). */\nexport const iconTabVariants = variants({\n  base:\n    \"inline-flex size-8 shrink-0 items-center justify-center text-muted-foreground inset-ring \" +\n    \"inset-ring-transparent [&>svg]:size-4 rounded\",\n  variants: {\n    state: {\n      default: \"\",\n      active: \"bg-card text-foreground inset-ring-border\",\n    },\n  },\n  defaultVariants: { state: \"default\" },\n});\n\nexport type IconTabProps = {\n  active?: boolean;\n  label: string;\n  className?: string;\n  children?: ReactNode;\n  onClick?: () => void;\n};\n\nexport function IconTab({ active = false, label, className, children, onClick }: IconTabProps) {\n  return (\n    <ButtonPlain\n      type=\"button\"\n      role=\"tab\"\n      aria-label={label}\n      className={cn(iconTabVariants({ state: (active ? \"active\" : \"default\") }), className)}\n      aria-selected={active}\n      tabIndex={(active ? 0 : -1)}\n      data-slot=\"icon-tab\"\n      data-state={(active ? \"active\" : \"default\")}\n      onClick={() => onClick?.()}\n    >\n      {children}\n    </ButtonPlain>\n  );\n}\n",
      "path": "components/icon-tab.tsx",
      "target": "components/icon-tab.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "icon-tab",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Icon Tab",
  "type": "registry:component"
}
