Glass Radio Group
washiveil/glass-radio-groupFreeComponent
Radio group on glass with ruri selection dots, built on Radix RadioGroup.
Install it
npx shadcn@latest add https://washiveil.alexchih.com/r/glass-radio-group.jsonSource
1'use client'23import * as React from 'react'4import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'56import { cn } from '@/lib/utils'78const GlassRadioGroup = React.forwardRef<9 React.ComponentRef<typeof RadioGroupPrimitive.Root>,10 React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>11>(({ className, ...props }, ref) => (12 <RadioGroupPrimitive.Root className={cn('grid gap-2.5', className)} {...props} ref={ref} />13))14GlassRadioGroup.displayName = RadioGroupPrimitive.Root.displayName1516const GlassRadioGroupItem = React.forwardRef<17 React.ComponentRef<typeof RadioGroupPrimitive.Item>,18 React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>19>(({ className, ...props }, ref) => (20 <RadioGroupPrimitive.Item21 ref={ref}22 className={cn(23 'peer aspect-square size-4.5 rounded-full border border-glass-edge bg-glass focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',24 className,25 )}26 {...props}27 >28 <RadioGroupPrimitive.Indicator className="flex items-center justify-center">29 <span className="size-2 rounded-full bg-ruri dark:bg-ruri-soft" />30 </RadioGroupPrimitive.Indicator>31 </RadioGroupPrimitive.Item>32))33GlassRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName3435export { GlassRadioGroup, GlassRadioGroupItem }
What it pulls in
npm packages
Other registry items
Files it writes
More from washiveil
All 58 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Ambient Fieldambient-field | washiveil | Components | Free | no deps | |
| Chipchip | washiveil | Components | Free | 1 dep | |
| Code Badgecode-badge | washiveil | Components | Free | no deps | |
| Glass Accordionglass-accordion | washiveil | Components | Free | 2 deps | |
| Glass Alertglass-alert | washiveil | Components | Free | 1 dep | |
| Glass Alert Dialogglass-alert-dialog | washiveil | Components | Free | 1 dep | |
| Glass Aspect Ratioglass-aspect-ratio | washiveil | Components | Free | 1 dep | |
| Glass Avatarglass-avatar | washiveil | Components | Free | 1 dep |
