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/card-glass

Card Glass

shadcn-glass-ui/card-glass
FreeComponent

CardGlass Compound Component

Install it

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

Source

components/glass/ui/card-glass.tsxraw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/card-glass.json · first 6 KB
1/* eslint-disable react-refresh/only-export-components */
2/**
3 * CardGlass Compound Component
4 *
5 * A glass-themed card with compound sub-components matching shadcn/ui Card API.
6 * Provides structure (Header, Content, Footer) with glass visual effects.
7 *
8 * @example
9 * ```tsx
10 * // Object pattern (recommended)
11 * <CardGlass.Root intensity="medium" glow="blue">
12 * <CardGlass.Header>
13 * <CardGlass.Title>Card Title</CardGlass.Title>
14 * <CardGlass.Description>Card description</CardGlass.Description>
15 * <CardGlass.Action>
16 * <ButtonGlass size="sm">Action</ButtonGlass>
17 * </CardGlass.Action>
18 * </CardGlass.Header>
19 * <CardGlass.Content>
20 * <p>Main content goes here</p>
21 * </CardGlass.Content>
22 * <CardGlass.Footer>
23 * <ButtonGlass variant="ghost">Cancel</ButtonGlass>
24 * <ButtonGlass>Save</ButtonGlass>
25 * </CardGlass.Footer>
26 * </CardGlass.Root>
27 *
28 * // Named exports (shadcn/ui compatible)
29 * import { CardGlassRoot, CardGlassHeader, CardGlassTitle } from '@/components/glass/ui';
30 * ```
31 *
32 * @see GlassCard - Simple glass container without structure
33 * @see Card (shadcn/ui) - Reference implementation
34 */
35
36import * as React from 'react';
37import { type CSSProperties } from 'react';
38import { cn } from '@/lib/utils';
39import type { GlowType, IntensityType } from '@/lib/variants/glass-card-variants';
40import '@/glass-theme.css';
41
42// ========================================
43// TYPES
44// ========================================
45
46export interface CardGlassRootProps extends React.ComponentProps<'div'> {
47 /**
48 * Glass blur intensity
49 * @default 'medium'
50 */
51 intensity?: IntensityType;
52 /**
53 * Glow effect color
54 * @default null
55 */
56 glow?: GlowType;
57 /**
58 * Enable hover effects
59 * @default false
60 */
61 hover?: boolean;
62}
63
64// ========================================
65// STYLE MAPS (CSS Variables)
66// ========================================
67
68const blurMap: Record<IntensityType, string> = {
69 subtle: 'var(--blur-sm)', // 8px
70 medium: 'var(--blur-md)', // 16px
71 strong: 'var(--blur-lg)', // 24px
72};
73
74const bgVarMap: Record<IntensityType, string> = {
75 subtle: 'var(--card-subtle-bg)',
76 medium: 'var(--card-medium-bg)',
77 strong: 'var(--card-strong-bg)',
78};
79
80const borderVarMap: Record<IntensityType, string> = {
81 subtle: 'var(--card-subtle-border)',
82 medium: 'var(--card-medium-border)',
83 strong: 'var(--card-strong-border)',
84};
85
86const glowVarMap: Record<string, string> = {
87 blue: 'var(--glow-blue)',
88// … 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
Checkbox Glasscheckbox-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