Card
The Card component displays information in card format and can also be used as links. It provides modern glass effects and gradients.
Basic Usage
Section titled “Basic Usage”Supports npm, pnpm, yarn, and more so users can choose their preferred tool.
Offers full dark mode support with beautiful gradients and glassmorphism effects.
Size Examples
Section titled “Size Examples”A card with small padding. Suitable for displaying simple information.
A card with default padding. Used in most cases.
A card with large padding. Used for important information or detailed content.
Link Cards
Section titled “Link Cards”Learn how to install and configure the Page theme. Follow the step-by-step guide to get started quickly.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'elevated' | 'outlined' | 'gradient' | 'default' | Card style |
padding | 'sm' | 'md' | 'lg' | 'md' | Card padding |
icon | string | - | Icon (optional) |
title | string | - | Title (optional) |
subtitle | string | - | Subtitle (optional) |
href | string | - | Link URL (optional) |
target | string | - | Link target (optional) |
Usage Examples
Section titled “Usage Examples”Basic Card
Section titled “Basic Card”<Card>This is a basic card. Used for displaying simple information.</Card>Card with Title and Icon
Section titled “Card with Title and Icon”<Card icon="" title="Design" subtitle="Beautiful UI"> Explains the design features of the Page theme. Provides a modern and intuitive interface.</Card>Various Styles
Section titled “Various Styles”<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>Link Card
Section titled “Link Card”<Card variant="elevated" icon="" title="Documentation" href="/docs"> Navigate to documentation.</Card>External Link
Section titled “External Link”<Card variant="outlined" icon="" title="GitHub" href="https://github.com" target="_blank"> Visit the GitHub repository.</Card>Features
Section titled “Features”Modern Design
Section titled “Modern Design”- 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
Variant-specific Features
Section titled “Variant-specific Features”- Default: Default style with moderate shadow and glass effect
- Elevated: Stronger shadow and hover effects
- Outlined: Transparent background with border only
- Gradient: Beautiful gradient background (new feature)
Dark Mode Support
Section titled “Dark Mode Support”- Automatic color adjustment
- Consistent user experience
- Perfect theme compatibility
Responsive Design
Section titled “Responsive Design”- Optimized size on mobile
- Flexible grid layout
- Touch-friendly interface
Animation Effects
Section titled “Animation Effects”- Card Fade-in: Smooth appearance on page load
- Hover Effects: Natural transformation on mouse over
- Icon Animation: Icon scale effect on hover
Styling
Section titled “Styling”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);}Browser Support
Section titled “Browser Support”- Chrome 88+
- Firefox 85+
- Safari 14+
- Edge 88+
Provides optimal performance on modern browsers.