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/icon-button-glass

Icon Button Glass

shadcn-glass-ui/icon-button-glass
FreeComponent

Icon-only button with glassmorphism styling and touch-friendly sizing. * Perfect for toolbar actions, header controls, and compact interfaces. * * ## Features

Install it

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

Source

components/glass/atomic/icon-button-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/icon-button-glass.json · first 6 KB
1/**
2 * IconButtonGlass Component
3 *
4 * Icon-only button with glassmorphism styling and touch-friendly sizing.
5 * Perfect for toolbar actions, header controls, and compact interfaces.
6 *
7 * ## Features
8 * - Icon-only button with required aria-label for accessibility
9 * - 4 size variants: `sm` (32px), `md` (40px), `lg` (48px), `touch` (44px mobile, 40px desktop)
10 * - 3 visual variants: `gradient` (colorful gradient), `subtle` (glass card), `ghost` (transparent)
11 * - Touch-friendly sizing with WCAG 2.1 AA compliance (44px minimum)
12 * - Responsive touch variant adapts to screen size
13 * - Built-in hover scale animation (105%)
14 * - Focus ring for keyboard navigation
15 * - Accepts any Lucide React icon component
16 * - Customizable icon size independent of button size
17 * - Theme-aware styling through CSS variables
18 *
19 * ## CSS Variables
20 * Uses inline gradient styles (NOT CSS variables) for visual variants:
21 * - `gradient` variant: `--icon-btn-from`, `--icon-btn-to`, `--icon-btn-shadow`, `--icon-btn-text`
22 * - `subtle` variant: `--card-subtle-bg`, `--card-subtle-border`, `--icon-btn-text`
23 * - `ghost` variant: No CSS variables (transparent background)
24 *
25 * @example Basic icon button
26 * ```tsx
27 * import { IconButtonGlass } from 'shadcn-glass-ui'
28 * import { Search } from 'lucide-react'
29 *
30 * function Toolbar() {
31 * return (
32 * <IconButtonGlass
33 * icon={Search}
34 * aria-label="Search"
35 * onClick={() => console.log('Search clicked')}
36 * />
37 * )
38 * }
39 * ```
40 *
41 * @example Touch-friendly size for mobile
42 * ```tsx
43 * import { Menu } from 'lucide-react'
44 *
45 * <IconButtonGlass
46 * icon={Menu}
47 * size="touch"
48 * aria-label="Open menu"
49 * />
50 * ```
51 *
52 * @example Different variants
53 * ```tsx
54 * import { Settings, Bell, User } from 'lucide-react'
55 *
56 * // Gradient (colorful)
57 * <IconButtonGlass icon={Settings} variant="gradient" aria-label="Settings" />
58 *
59 * // Subtle (glass card)
60 * <IconButtonGlass icon={Bell} variant="subtle" aria-label="Notifications" />
61 *
62 * // Ghost (transparent)
63 * <IconButtonGlass icon={User} variant="ghost" aria-label="Profile" />
64 * ```
65 *
66 * @example Custom icon size
67 * ```tsx
68 * import { Trash2 } from 'lucide-react'
69 *
70 * <IconButtonGlass
71 * icon={Trash2}
72 * iconSize={16}
73 * size="sm"
74 * variant="subtle"
75 * aria-label="Delete"
76 * />
77 * ```
78 *
79 * @accessibility
80 * - `aria-label` prop is required for screen reader support
81 * - Focus ring visible for keyboard navigation (2px ring with offset)
82// … truncated

Facts

Registry
shadcn-glass-ui
Type
registry:component
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
Checkbox Glasscheckbox-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