Glass Card
Frosted card with depth-aware blur, refraction edge highlights, and elevation transitions.
pnpm dlx @glinui/cli@latest add glass-cardMaya Kovacs
Staff designer, Platform
- 48
- Projects
- 1.2k
- Reviews
- 36d
- Streak
Installation$
pnpm dlx @glinui/cli@latest add glass-cardPrefer the package?
Usage$
GlassCard is a compound component with GlassCardHeader, GlassCardContent, and GlassCardFooter subcomponents. Place it over a colorful background to see the glass effect.
Glass is this component's identity, so it is the default here. It uses a readable opacity floor (--glass-readable) and still needs a colorful backdrop to look its best.
Examples$
Variants$
glinr is the default, plain is the flat shadcn look, solid is a neutral tonal face and glass is opt-in. Glass needs a backdrop, so the set below sits on a vivid one.
glinr
Crisp on any stage.
Learn moreplain
Crisp on any stage.
Learn moresolid
Crisp on any stage.
Learn moreglass
Opt-in. Needs a backdrop.
Learn moreimport { GlassCard } from "@glinui/ui"
// Omit variant to follow the ambient style (glinr by default).export function GlassCardVariants() {return ( <> <GlassCard variant="glinr"> ... </GlassCard> <GlassCard variant="plain"> ... </GlassCard> <GlassCard variant="solid"> ... </GlassCard> <GlassCard variant="glass"> ... </GlassCard> </>)}Colors$
Pass another variant plus tone to leave glass behind: variant="soft" tone="success".
accent
The effect color follows the tone token.
Learn moresuccess
The effect color follows the tone token.
Learn morewarning
The effect color follows the tone token.
Learn moredanger
The effect color follows the tone token.
Learn moreinfo
The effect color follows the tone token.
Learn moreimport { GlassCard } from "@glinui/ui"
export function GlassCardTones() {return ( <GlassCard variant="soft" tone="success"> ... </GlassCard>)}In a layout$
Glass cards as metric tiles in a dashboard row (shown here on the page surface, so they collapse to readable panels).
Overview
Last 7 days// Glass cards as metric tiles in a dashboard row (shown here on the page surface, so they collapse to readable panels).import { GlassCard } from "@glinui/ui"
export function GlassCardLayout() {return ( <section className="grid gap-4 sm:grid-cols-3"> ... </section>)}Accessibility$
- GlassCard renders a
<div>, add semantic structure inside (headings, paragraphs). - Ensure text contrast meets WCAG AA 4.5:1 on glass surfaces.
Reduced Motion$
Hover elevation transitions respect prefers-reduced-motion and disable transform changes.
API Reference$
GlassCard$
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
hoverLift | boolean | No | true | Lift on hover. Default true. |
GlassCardHeader / GlassCardContent / GlassCardFooter$
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
hoverLift | boolean | No | true | Lift on hover. Default true. |
Source$
import { GlassCard, GlassCardHeader, GlassCardContent, GlassCardFooter } from "@glinui/ui"Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/glass-card.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
GlassCardProps
GlassCardProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
hoverLift | boolean | No | true | Lift on hover. Default true. |