{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glass-toggle-group",
  "title": "Glass Toggle Group",
  "author": "Alex Chih (https://alexchih.com)",
  "description": "Segmented toggles on the glass pill ground, built on Radix ToggleGroup.",
  "dependencies": [
    "radix-ui",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://washiveil.alexchih.com/r/theme.json",
    "https://washiveil.alexchih.com/r/glass-toggle.json"
  ],
  "files": [
    {
      "path": "registry/washiveil/ui/glass-toggle-group.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui'\nimport { type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '@/lib/utils'\nimport { glassToggleVariants } from './glass-toggle'\n\nconst GlassToggleGroupContext = React.createContext<VariantProps<typeof glassToggleVariants>>({\n  size: 'default',\n  variant: 'default',\n})\n\nconst GlassToggleGroup = React.forwardRef<\n  React.ComponentRef<typeof ToggleGroupPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof glassToggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n  <ToggleGroupPrimitive.Root\n    ref={ref}\n    className={cn(\n      'inline-flex gap-1 rounded-full border border-muted bg-muted p-1 backdrop-blur',\n      className,\n    )}\n    {...props}\n  >\n    <GlassToggleGroupContext.Provider value={{ variant, size }}>\n      {children}\n    </GlassToggleGroupContext.Provider>\n  </ToggleGroupPrimitive.Root>\n))\nGlassToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName\n\nconst GlassToggleGroupItem = React.forwardRef<\n  React.ComponentRef<typeof ToggleGroupPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof glassToggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n  const context = React.useContext(GlassToggleGroupContext)\n\n  return (\n    <ToggleGroupPrimitive.Item\n      ref={ref}\n      className={cn(\n        glassToggleVariants({\n          variant: context.variant || variant,\n          size: context.size || size,\n        }),\n        className,\n      )}\n      {...props}\n    >\n      {children}\n    </ToggleGroupPrimitive.Item>\n  )\n})\nGlassToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName\n\nexport { GlassToggleGroup, GlassToggleGroupItem }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}