Skip to Content
NarakUI

Card

Cards are flexible containers for grouping related content and actions.

Basic card

Share of voice

Your brand appeared in 38% of ChatGPT answers about project management tools this week.

Liquid glass

Pass variant="liquid-glass" to enable real-time WebGL2 optical rim refraction powered by GlassLayer with a translucent CSS fallback on first paint and non-WebGL browsers. Use live when animated content moves behind the card.

Liquid glass card
WebGL2 radial perimeter bending with chromatic dispersion and cursor rim light.

Inspect the curved corners to see the backdrop pull subtly toward the center.

Materials

Combine variant="liquid-glass" with material (frosted, clear, or tinted) and set refract={false} when you want pure CSS glass without a WebGL canvas.

Frosted
Balanced 14px blur with luminous specular bevel.

Diffuses busy backgrounds while preserving AA contrast.

Clear
High-clarity crystal glass over rich media.

Minimal tint with 6px optical blur and vivid saturation.

Tinted
Chromatic surface wash with glass rim light.

Holds brand or semantic color while keeping edge depth.

Default (solid)
Matte opaque NarakUI surface.

Zero bleed-through for nested cards or dense data.

Backgrounds

The default background is primary.

Primary

Secondary

Tertiary

Quaternary

Padding

sm adds 16 px of padding and md adds 24 px. The default is none.

Small padding

16 px. Use it for compact cards in grids and side panels.

Medium padding

24 px. Use it for standalone cards such as report summaries.

Installation

pnpm dlx shadcn@latest add @narakui/card

Add "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/card.json.

Usage

import { Card } from '@/components/ui/card';

<Card padding="sm">Default matte card</Card>

<Card variant="liquid-glass" padding="sm">
  Liquid glass card with WebGL2 optical refraction
</Card>

Properties

PropTypeDefaultDescription
variant'default' | 'liquid-glass''default'Matte NarakUI surface (default) or optical liquid glass (liquid-glass)
background'primary' | 'secondary' | 'tertiary' | 'quaternary''primary'Semantic background surface tier of the card
padding'none' | 'sm' | 'md''none'Apply a predefined internal padding size
material'frosted' | 'clear' | 'tinted' | 'solid''frosted' (on liquid-glass) / 'solid' (on default)Glass surface material preset
refractbooleantrue (on liquid-glass) / false (on default)Enables real-time WebGL2 rim refraction via GlassLayer
blurnumber6 (frosted) / 4 (clear)Backdrop frost blur in pixels
tintnumberTier defaultBackdrop tint opacity (0 to 1)
livebooleanfalseRepaints the refracted backdrop every frame for animated scenes behind the card
backdropstring—CSS selector of an ancestor whose content is refracted instead of the page
interactivebooleanfalseEnables press feedback and hover rim response
cursorLightbooleanMatches interactiveEnables cursor-tracking specular rim highlight on fine pointers
opticsCardOptics—Fine-tuned GlassLayer optical parameters
classNamestring—Additional CSS classes to apply to the card container