Card

Card surface with header, title, content and footer slots and a softly lit edge. It can reveal its parts in reading order as it appears, and its edge can brighten as you press it.

Preview

Installation

npx @lumioui/cli add card

Usage

import { Card } from "@/components/ui/card/card";
<Card />

Examples

Glass

The one place a glass card belongs: floating over the photo it describes, as a place card on a trail map.

Profile

A tutor card in a language-lessons app: one card for one person, rating + price in the header line, Book as the primary and Follow toggling beside it.

Ticket

A rail ticket that switches on as it arrives (dim parts, one sheen, then header → times → footer).

API reference

Card

Prop Type Default
className string —
variant
"elevated" | "outlined" +2 "elevated" | "outlined" | "filled" | "glass"

Surface voice — "elevated" (default, soft shadow on card color), "outlined" (hairline border, no shadow — the paper-canvas idiom), "filled" (tonal secondary fill, no shadow), "glass" (glass material — floating panels over content).

—
onPress (e: GestureResponderEvent) => void

Makes the card pressable: spring scale + light haptic.

—
haptic
"light" | "medium" | "heavy" +2 "light" | "medium" | "heavy" | "selection" | false

Haptic on press. Default "light"; false to disable.

—
disabled boolean —
appear boolean

Switch the card on as it mounts (opt-in): its parts start dim, one sheen crosses the surface, then each direct child switches on in reading order. Default false.

—
pressLight boolean

Pressable cards only (opt-in): the lit edge brightens with press depth (to ~1.6× its strength) as well as the scale dip. Default false.

—

CardText

Prop Type Default
className string —