Card
Container component with both Free and Pro versions. Free offers basic layout, Pro adds 3D effects and animations.
Unlock Advanced Card Features
Get access to powerful pro features that enhance your card component with advanced capabilities, premium styling options, and optimized performance.
Pro Features
Unlock advanced capabilities with the Pro version
Premium Variants
Access glass, gradient, neon, and glow card styles with stunning visual effects
Interactive Effects
3D tilt perspective, parallax depth layers, glow hover, and smooth lift animations
Visual Enhancements
Backdrop blur, animated gradients, glow effects, and shadow transitions
Performance Optimized
GPU-accelerated animations with reduced repaints for smooth 60fps interactions
Installation
Install via CLI
# Default installation (asks for version if Pro license detected)
npx @moontra/moonui-cli add card
# Explicit version selection
npx @moontra/moonui-cli add card --variant=free # Install free version
npx @moontra/moonui-cli add card --variant=pro # Install pro version (requires license)
# Installation paths:
# - Free version: components/ui/card.tsx
# - Pro version: components/pro/card-pro.tsxUsage
Basic Usage
Create project
Deploy your new project in one-click.
Choose a framework to get started with your project.
Pro Usage
Premium Features
Experience enhanced card interactions
Advanced card with glassmorphism effect and smooth hover animations.
Examples
Simple Card
Basic card with minimal content.
Notifications
You have 3 unread messages.
Card with Content
Card with header, content, and footer sections.
Performance
Your app performance metrics
98.5%
Uptime this month
User Profile Card
Card displaying user information with avatar.
John Doe
Software Engineer
Building amazing products with modern web technologies.
Stats Card
Card showing statistics with icons.
Total Revenue
$45,231.89
Size Scale (Section Padding)
size is a density switch, not a width switch: the root Card hands its resolved size down to CardHeader, CardContent and CardFooter through React context. md is the default and keeps the classic 24px padding, so existing cards render exactly as before.
Small
p-4 - 16px sections
Dense lists, sidebars and compact dashboards.
Medium
p-6 - 24px sections (default)
The default density used by every example above.
Large
p-8 - 32px sections
Marketing sections and feature highlights.
Extra large
p-10 - 40px sections
Hero cards where the card is the page.
Variants
All six free variants side by side. glass and gradient are rendered over a tinted surface here, because their translucency only reads against a background with some contrast.
default
Border plus a subtle shadow.
outline
Transparent surface, no shadow.
filled
Secondary surface, no border.
elevated
Borderless with a raised shadow.
gradient
Primary tinted diagonal gradient.
glass
Translucent surface with backdrop blur.
Radius Scale
radius is independent from size and variant. It replaces the rounding of the card root only, so nested media still needs its own rounding.
none
sm
default
lg
full
Card as a Link (asChild)
With asChild the card styles are applied to your own element through Radix Slot, so the whole card becomes a single anchor: one hit target, one focus stop, real middle-click and open-in-new-tab behaviour. The size context still reaches the sections and the interactive CSS classes still apply, but the Framer Motion micro-interaction is skipped in this mode - Slot merges props into one child while motion needs an element of its own. Swap the anchor for a Next.js Link when you route internally.
Premium Analytics Dashboard Card
Advanced glassmorphism card with real-time stats, animated charts, and interactive hover effects.
Premium Analytics
Real-time performance metrics & insights
Total Revenue
$124,592
Active Users
8,429
$13,408 remaining to monthly goal
3D Interactive Pricing Card
Advanced 3D tilt effect with parallax layers, animated gradients, and interactive elements.
Pro Enterprise
Everything you need to build at scale
System Monitoring Card with Live Updates
Real-time system monitoring with animated progress bars, status indicators, and gradient animations.
System Health Monitor
Real-time infrastructure status
Response Time
124ms
Requests/min
2.4k
Error Rate
0.01%
Interactive Glow Card
Premium glow effect using the real Pro `glow` variant with `microInteraction="glow"`. For a cursor-following spotlight, use the dedicated Spotlight Card Pro component.
Interactive Glow
Premium glow variant with smooth hover lighting
Hover over this card to see the premium glow effect, powered by the real Pro glow variant. For a cursor-tracking spotlight, reach for the dedicated Spotlight Card component.
Dynamic
Interactive
Elegant