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/theme-toggle-glass

Theme Toggle Glass

shadcn-glass-ui/theme-toggle-glass
FreeComponent

Theme cycling button that switches between Light, Aurora, and Glass themes. * Displays animated icon transitions with theme-aware styling. * * ## Features

Install it

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

Source

components/glass/atomic/theme-toggle-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/theme-toggle-glass.json
1/**
2 * ThemeToggleGlass Component
3 *
4 * Theme cycling button that switches between Light, Aurora, and Glass themes.
5 * Displays animated icon transitions with theme-aware styling.
6 *
7 * ## Features
8 * - One-click theme cycling through 3 themes (light → aurora → glass → light)
9 * - Animated icon transitions (Sun → Moon → Palette)
10 * - Built on IconButtonGlass styling for consistency
11 * - Theme preview via icon (shows NEXT theme, not current)
12 * - Optional text label showing next theme name
13 * - Responsive label visibility (hidden on mobile by default)
14 * - Integrates with useTheme hook for global theme state
15 * - Accessible button with descriptive aria-label
16 * - Keyboard accessible (Enter/Space to activate)
17 * - Custom toggle handler support for advanced use cases
18 *
19 * ## CSS Variables
20 * Uses IconButtonGlass CSS variables:
21 * - `--card-subtle-bg` - Button background
22 * - `--card-subtle-border` - Button border
23 * - `--text-secondary` - Icon and label color
24 *
25 * @example Basic theme toggle
26 * ```tsx
27 * import { ThemeToggleGlass } from 'shadcn-glass-ui'
28 *
29 * function Header() {
30 * return (
31 * <ThemeToggleGlass />
32 * )
33 * }
34 * ```
35 *
36 * @example Icon-only (no label)
37 * ```tsx
38 * <ThemeToggleGlass iconOnly />
39 * ```
40 *
41 * @example Custom toggle handler
42 * ```tsx
43 * function AdvancedThemeToggle() {
44 * const handleToggle = () => {
45 * console.log('Theme changing...')
46 * // Custom logic here
47 * }
48 *
49 * return <ThemeToggleGlass onToggle={handleToggle} />
50 * }
51 * ```
52 *
53 * @example Larger icon size
54 * ```tsx
55 * <ThemeToggleGlass iconSize={24} />
56 * ```
57 *
58 * @accessibility
59 * - Descriptive aria-label indicates next theme (e.g., "Switch to Aurora theme")
60 * - Focus ring visible for keyboard navigation
61 * - Keyboard activation via Enter or Space key
62 * - Icon provides visual feedback for theme state
63 * - Hover scale animation (105%) indicates interactivity
64 *
65 * @since v1.0.0
66 */
67
68import { forwardRef, type ButtonHTMLAttributes, type CSSProperties } from 'react';
69import { Sun, Moon, Palette } from 'lucide-react';
70import { cn } from '@/lib/utils';
71import { useTheme, type ThemeName } from '@/lib/theme-context';
72import '@/glass-theme.css';
73
74// ========================================
75// CONFIGURATION
76// ========================================
77
78const themes: ThemeName[] = ['light', 'aurora', 'glass'];
79
80const themeConfig: Record<ThemeName, { label: string; icon: typeof Sun }> = {
81 light: { label: 'Light', icon: Sun },
82// … truncated

Facts

Registry
shadcn-glass-ui
Type
registry:component
Access
Free
Files written
0
Licence
Apache-2.0
In the index
at or before 2026-08-09
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
Checkbox Glasscheckbox-glassshadcn-glass-uiComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex