Glin UI
Signature / Molecule

Depth Card

Parallax tilt card with layered glass planes and glare effect on hover.

AL
Studio

Design system seats

Move across the card: the badge, price tag and avatar float at different heights above the face.

$32/ seat
JSKORP

Installation$

Install from
pnpm dlx @glinui/cli@latest add depth-card

Prefer the package?

Usage$

DepthCard is a "use client" component. It tilts based on cursor position with an optional glare effect. Works great for product showcases and interactive cards.

DepthLayer children float at four heights (depth 1 to 4) above the card face. As the card tilts toward the pointer, the avatar, price tag and badge shift against the face, and a glare sheen follows the cursor. autoPlay runs a slow synthetic pointer for touch and screenshots.

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 more

plain

Crisp on any stage.

Learn more

solid

Crisp on any stage.

Learn more

glass

Opt-in. Needs a backdrop.

Learn more
import { DepthCard, DepthLayer } from "@glinui/ui"
// Omit variant to follow the ambient style (glinr by default).
export function DepthCardVariants() {
return (
<>
<DepthCard variant="glinr">
...
</DepthCard>
<DepthCard variant="plain">
...
</DepthCard>
<DepthCard variant="solid">
...
</DepthCard>
<DepthCard variant="glass">
...
</DepthCard>
</>
)
}

Colors$

Tones apply through the soft variant, so the face is tinted and the text stays AA.

accent

The effect color follows the tone token.

Learn more

success

The effect color follows the tone token.

Learn more

warning

The effect color follows the tone token.

Learn more

danger

The effect color follows the tone token.

Learn more

info

The effect color follows the tone token.

Learn more
import { DepthCard, DepthLayer } from "@glinui/ui"
export function DepthCardTones() {
return (
<DepthCard variant="soft" tone="success">
...
</DepthCard>
)
}

In a layout$

Depth cards as metric tiles in a dashboard row.

Overview

Last 7 days
Revenue$48.2k+12.4%
Active teams1,284+4.1%
Deploys9,310+18%
Recent activity
Maya shipped v2.4just now
Build 8812 passedjust now
Sam invited 3 teammatesjust now
// Depth cards as metric tiles in a dashboard row.
import { DepthCard, DepthLayer } from "@glinui/ui"
export function DepthCardLayout() {
return (
<section className="grid gap-4 sm:grid-cols-3">
...
</section>
)
}

Accessibility$

  • The glare overlay is aria-hidden="true", invisible to assistive technologies.
  • The card itself is a standard div with no implicit role; add role and keyboard handlers as needed.
  • Content inside the card remains fully accessible.

Reduced Motion$

When prefers-reduced-motion: reduce is active, the tilt transform is disabled via motion-reduce:transform-none and the glare layer is hidden via motion-reduce:hidden.

API Reference$

PropTypeRequiredDefaultDescription
autoPlaybooleanNofalseRuns a slow looping synthetic pointer so the tilt, glare and layer parallax are visible without hovering (demos, screenshots, touch). Needs motion level full. A real pointer takes over while hovering.
glarebooleanNotrueGlare effect
glareOpacitynumberNo0.35Glare max opacity
hoverScalenumberNo1.02Scale on hover
maxTiltnumberNo15Maximum tilt angle in degrees
perspectivenumberNo800Perspective distance in px

Source$

import { DepthCard } from "@glinui/ui"
packages/ui/src/components/depth-card.tsx

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/depth-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

DepthCardProps

DepthCardProps

PropTypeRequiredDefaultDescription
autoPlaybooleanNofalseRuns a slow looping synthetic pointer so the tilt, glare and layer parallax are visible without hovering (demos, screenshots, touch). Needs motion level full. A real pointer takes over while hovering.
glarebooleanNotrueGlare effect
glareOpacitynumberNo0.35Glare max opacity
hoverScalenumberNo1.02Scale on hover
maxTiltnumberNo15Maximum tilt angle in degrees
perspectivenumberNo800Perspective distance in px

DepthLayerProps

PropTypeRequiredDefaultDescription
depthkeyof typeof LAYER_DEPTHNo2How far the layer floats above the card face (1 closest, 4 highest).