Skip to content

Card

The Card component displays information in card format and can also be used as links. It provides modern glass effects and gradients.

📦
Package Manager
Support for various package managers

Supports various package managers like npm, pnpm, yarn, allowing users to choose their preferred tools.

🎨
Theme Support
Dark/Light Mode

Provides beautiful gradients and glassmorphism effects with perfect dark mode support.

Small Padding

A card with small padding. Suitable for displaying simple information.

Medium Padding

A card with default padding. Used in most cases.

Large Padding

A card with large padding. Used for important information or detailed content.

🚀
Get Started
Quick Installation Guide

Learn how to install and configure the Page theme. You can easily get started with step-by-step guides.

PropTypeDefaultDescription
variant'default' | 'elevated' | 'outlined' | 'gradient''default'Card style
padding'sm' | 'md' | 'lg''md'Card padding
iconstring-Icon (optional)
titlestring-Title (optional)
subtitlestring-Subtitle (optional)
hrefstring-Link URL (optional)
targetstring-Link target (optional)
<Card>This is a basic card. Used for displaying simple information.</Card>
<Card icon="🎨" title="Design" subtitle="Beautiful UI">
Explains the design features of the Page theme. Provides a modern and
intuitive interface.
</Card>
<Card variant="default" title="Default">
A card with default style.
</Card>
<Card variant="elevated" title="Elevated">
A card with strong shadow effects.
</Card>
<Card variant="outlined" title="Outlined">
A transparent card with only borders.
</Card>
<Card variant="gradient" title="Gradient">
A special card with gradient background.
</Card>
<Card variant="elevated" icon="📚" title="Documentation" href="/docs">
Navigate to documentation.
</Card>
<Card
variant="outlined"
icon="🔗"
title="GitHub"
href="https://github.com"
target="_blank"
>
Visit the GitHub repository.
</Card>
  • Glass Effect: Applied backdrop-filter: blur(20px)
  • Gradient Background: Beautiful gradient effects
  • Soft Shadows: Multi-layered shadows for depth
  • Hover Animation: translateY(-4px) scale(1.02) transform
  • Default: Default style with moderate shadows and glass effects
  • Elevated: Stronger shadows and hover effects
  • Outlined: Transparent background with only borders
  • Gradient: Beautiful gradient background (new feature)
  • Automatic color adjustment
  • Consistent user experience
  • Perfect theme compatibility
  • Optimized size on mobile
  • Flexible grid layout
  • Touch-friendly interface
  • Card Fade-in: Smooth appearance on page load
  • Hover Effects: Natural transformation on mouse over
  • Icon Animation: Icon scale effect on hover

The Card component can be customized through CSS variables:

:root {
--page-card-border-radius: 16px;
--page-card-padding: 24px;
--page-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
  • Chrome 88+
  • Firefox 85+
  • Safari 14+
  • Edge 88+

Provides optimal performance on modern browsers.