Glass Checkbox
washiveil/glass-checkboxFreeComponent
Checkbox on glass with a ruri checked state, built on Radix Checkbox.
Install it
npx shadcn@latest add https://washiveil.alexchih.com/r/glass-checkbox.jsonSource
1'use client'23import * as React from 'react'4import { Checkbox as CheckboxPrimitive } from 'radix-ui'5import { Check } from 'lucide-react'67import { cn } from '@/lib/utils'89const GlassCheckbox = React.forwardRef<10 React.ComponentRef<typeof CheckboxPrimitive.Root>,11 React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>12>(({ className, ...props }, ref) => (13 <CheckboxPrimitive.Root14 ref={ref}15 className={cn(16 'peer size-4.5 shrink-0 rounded-md border border-glass-edge bg-glass backdrop-blur 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 data-[state=checked]:bg-ruri data-[state=checked]:border-ruri data-[state=checked]:text-white dark:data-[state=checked]:bg-ruri-soft dark:data-[state=checked]:border-ruri-soft dark:data-[state=checked]:text-deep',17 className,18 )}19 {...props}20 >21 <CheckboxPrimitive.Indicator className={cn('flex items-center justify-center text-current')}>22 <Check className="size-3.5" />23 </CheckboxPrimitive.Indicator>24 </CheckboxPrimitive.Root>25))26GlassCheckbox.displayName = CheckboxPrimitive.Root.displayName2728export { GlassCheckbox }
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 |
