UI LabUI Labv0.0.2
Showcase
Purchase
UI Lab UI Lab UI Lab Pro

Free

  • Limited to 3 projects
  • Core design tools for quick prototyping
  • Standard color palette
  • Basic typography
  • Core Components
Recommended

Pro

  • Unlimited projects
  • 50 premium templates for web & mobile
  • 100 advanced components (forms, modals, dashboards)
  • Advanced style management (tokens, themes, variants)
  • Lifetime access with free updates
  • Export to code (React, Tailwind, HTML)

Sorry this plugin isn't available for public use yet.

To get early access, leave your email and be the first to try an early version.

$49.99 1 License
Checkout
Introduction Fundamentals Components
  • Introduction
  • Installation
  • Quick Start
  • Plugin Interface Overview
  • Navigation
  • Keyboard Shortcuts
  • Creating Your First Design System
  • Adding Components
  • Exporting Design Tokens
  • Color Palette Generator
  • Typography Generator
  • Spacing Generator
  • Button
  • Input
  • Card
  • Header
  • Footer
  • Sidebar
  • Page Layouts
  • Form Templates
  • Dashboard Templates
  • Design Tokens
  • Component Architecture
  • Theming and Modes
  • Design System Guidelines
  • Component Usage
  • Accessibility Integration
  • Performance Optimization
  • Migrating Existing Projects
  • Custom Component Creation
  • Plugin API
  • Hooks and Utilities
  • Types and Interfaces
  • Configuration Files
  • Environment Setup
  • Plugin Settings
  • Roadmap
  • Contributing
  • Changelog
Docs / components / Card

Card

The Card component provides a flexible container for grouping related content with consistent styling and spacing.

Basic Usage

import { Card } from '@ui-lab/react';

<Card>
  <h3>Card Title</h3>
  <p>Card content goes here.</p>
</Card>

Variants

Default

<Card>
  <h3>Default Card</h3>
  <p>This is a default card with standard styling.</p>
</Card>

Elevated

<Card variant="elevated">
  <h3>Elevated Card</h3>
  <p>This card has a more prominent shadow.</p>
</Card>

Outlined

<Card variant="outlined">
  <h3>Outlined Card</h3>
  <p>This card uses a border instead of shadow.</p>
</Card>

Padding Options

<Card padding="none">No padding</Card>
<Card padding="small">Small padding</Card>
<Card padding="medium">Medium padding (default)</Card>
<Card padding="large">Large padding</Card>

Interactive Cards

Clickable

<Card clickable onClick={() => handleCardClick()}>
  <h3>Clickable Card</h3>
  <p>This entire card is clickable.</p>
</Card>

Hoverable

<Card hoverable>
  <h3>Hoverable Card</h3>
  <p>This card has hover effects.</p>
</Card>

API Reference

PropTypeDefaultDescription
variant'default' | 'elevated' | 'outlined''default'Card style variant
padding'none' | 'small' | 'medium' | 'large''medium'Internal padding
clickablebooleanfalseMakes the card clickable
hoverablebooleanfalseAdds hover effects
onClickfunctionundefinedClick event handler
classNamestringundefinedAdditional CSS classes

Examples

Product Card

<Card variant="elevated" hoverable>
  <img src="/product.jpg" alt="Product" />
  <div className="p-4">
    <h3 className="text-lg font-semibold">Product Name</h3>
    <p className="text-gray-600">Product description</p>
    <div className="mt-4 flex justify-between items-center">
      <span className="text-xl font-bold">$99</span>
      <Button size="small">Add to Cart</Button>
    </div>
  </div>
</Card>

Dashboard Widget

<Card>
  <div className="flex items-center justify-between mb-4">
    <h3 className="text-lg font-semibold">Analytics</h3>
    <Button variant="ghost" size="small" icon="refresh">
      Refresh
    </Button>
  </div>
  <div className="space-y-3">
    <div className="flex justify-between">
      <span>Page Views</span>
      <span className="font-semibold">1,234</span>
    </div>
    <div className="flex justify-between">
      <span>Unique Visitors</span>
      <span className="font-semibold">856</span>
    </div>
  </div>
</Card>
Edit this page on GitHub

Search functionality coming soon...

Type to see future search results here