BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-glass-ui/checkbox-glass

Checkbox Glass

shadcn-glass-ui/checkbox-glass
FreeComponent

Glass-themed checkbox built on Radix UI primitives with:

Install it

npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/checkbox-glass.json

Source

components/glass/ui/checkbox-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/checkbox-glass.json · first 6 KB
1/**
2 * CheckboxGlass Component
3 *
4 * Glass-themed checkbox built on Radix UI primitives with:
5 * - 100% shadcn/ui type compatibility
6 * - Theme-aware styling (glass/light/aurora)
7 * - Glow effect on hover/focus
8 * - Optional label
9 *
10 * @since v2.2.6 - Migrated to Radix UI primitives for full type compatibility
11 */
12
13import * as React from 'react';
14import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
15import { Check, Minus } from 'lucide-react';
16import { cn } from '@/lib/utils';
17import '@/glass-theme.css';
18
19// ========================================
20// TYPES
21// ========================================
22
23/**
24 * Checked state type compatible with shadcn/ui (Radix UI)
25 */
26export type CheckedState = boolean | 'indeterminate';
27
28/**
29 * Props for the CheckboxGlass component
30 *
31 * Extends Radix UI Checkbox.Root props for 100% shadcn/ui compatibility.
32 * All Radix props are supported including: checked, defaultChecked, onCheckedChange,
33 * disabled, required, name, value, etc.
34 *
35 * **Type Compatibility (v2.3.1+):**
36 * - Extends `React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>`
37 * - No more `as unknown as` type assertions needed
38 * - Full IntelliSense for all Radix props
39 *
40 * @accessibility
41 * - **Keyboard Navigation:** Space to toggle (WCAG 2.1.1)
42 * - **Focus Management:** Visible focus ring using `--focus-glow` CSS variable (WCAG 2.4.7)
43 * - **Screen Readers:** Radix UI handles ARIA attributes automatically
44 * - **Touch Targets:** 44x44px minimum touch area per Apple HIG (WCAG 2.5.5)
45 * - **Color Contrast:** Check mark and backgrounds meet WCAG AA contrast ratio 4.5:1
46 *
47 * @example
48 * ```tsx
49 * // shadcn/ui compatible API
50 * <CheckboxGlass
51 * checked={isChecked}
52 * onCheckedChange={(checked) => setIsChecked(checked === true)}
53 * />
54 *
55 * // Indeterminate state (tri-state checkbox)
56 * <CheckboxGlass
57 * checked={allSelected ? true : someSelected ? 'indeterminate' : false}
58 * onCheckedChange={(checked) => {
59 * if (checked === true) selectAll();
60 * else deselectAll();
61 * }}
62 * label="Select all"
63 * />
64 *
65 * // Legacy API (still supported)
66 * <CheckboxGlass checked={agreed} onChange={setAgreed} label="I agree to terms" />
67 * ```
68 *
69 * @since v2.3.0 - Added shadcn/ui compatible `onCheckedChange` and `indeterminate` support
70 * @since v2.2.6 - Migrated to Radix UI primitives for full type compatibility
71 */
72export interface CheckboxGlassProps extends Omit<
73 React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
74// … truncated

Facts

Registry
shadcn-glass-ui
Type
registry:ui
Access
Free
Files written
0
Licence
Apache-2.0
First indexed
2026-08-02
Last confirmed
today

Go to the source

yhooi2.github.io artyhoo/shadcn-glass-ui-library on GitHub Raw registry item This item as JSON

More from shadcn-glass-ui

All 76 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Alert Glassalert-glassshadcn-glass-uiComponentsFreeno deps
Animated Background Glassanimated-background-glassshadcn-glass-uiComponentsFreeno deps
Avatar Glassavatar-glassshadcn-glass-uiComponentsFreeno deps
Badge Glassbadge-glassshadcn-glass-uiComponentsFreeno deps
Base Progress Glassbase-progress-glassshadcn-glass-uiComponentsFreeno deps
Button Glassbutton-glassshadcn-glass-uiComponentsFreeno deps
Card Glasscard-glassshadcn-glass-uiComponentsFreeno deps
Circular Progress Glasscircular-progress-glassshadcn-glass-uiComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex