import type { Meta, StoryObj } from "@storybook/react" import { Card } from "./Card" /** * Displays a card container for organizing content. * * ## Props * - `size`: "1" | "2" | "3" | "4" | "5" (default: "2") * - `variant`: "surface" | "classic" | "ghost" (default: "surface") * - `asChild`: boolean */ const meta = { title: "base/containment/Card", component: Card, tags: ["autodocs"], argTypes: { children: { control: "text", description: "The content of the card", }, size: { control: "select", options: ["1", "2", "3", "4", "5"], description: "The size of the card, affecting padding and corner radius", }, variant: { control: "select", options: ["surface", "classic", "ghost"], description: "The visual style of the card", }, }, parameters: { layout: "centered", }, args: { children: "Card content", style: { width: 350 }, }, } satisfies Meta export default meta type Story = StoryObj /** * Default card with surface variant. */ export const Default: Story = {} /** * Card with classic variant. */ export const Classic: Story = { args: { variant: "classic", }, } /** * Card with ghost variant. */ export const Ghost: Story = { args: { variant: "ghost", }, } /** * Card with different sizes. */ export const Sizes: Story = { render: () => (

Size 1 - Small padding and radius

Size 2 - Default padding and radius

Size 3 - Large padding and radius

Size 4 - Extra large padding and radius

Size 5 - Maximum padding and radius

), } /** * Card with header, content, and footer structure. */ export const WithStructure: Story = { render: () => (
{/* Header */}

Card Title

Card subtitle or description

{/* Content */}

This is the main content area of the card. You can put any content here including text, images, forms, or other components.

{/* Footer */}
), } /** * Pricing card example. */ export const PricingCard: Story = { render: () => (

Pro Plan

Perfect for growing teams

$24 /month
  • 10 users included
  • 2GB of storage
  • Email support
), } /** * Profile card example. */ export const ProfileCard: Story = { render: () => (
JD

John Doe

Product Designer

Passionate about creating beautiful and functional user experiences.

), } /** * Feature card example. */ export const FeatureCard: Story = { render: () => (

Lightning Fast

Experience blazing fast performance with our optimized architecture and efficient algorithms.

Learn more →
), } /** * Card grid layout. */ export const CardGrid: Story = { render: () => (
{[1, 2, 3, 4, 5, 6].map(i => (

Feature {i}

Description for feature number {i}. This card is part of a responsive grid layout.

))}
), } /** * Card with image. */ export const WithImage: Story = { render: () => (
Image Placeholder

Card with Image

This card includes an image at the top followed by content below.

), } /** * Interactive card with hover effects. */ export const Interactive: Story = { render: () => (

Hover Me

This card has hover effects. Try hovering over it to see the animation.

Lift Effect

This card lifts up on hover instead of scaling.

), }