Mahmoud Ilyan

Card

Cards

About

A bounded surface container with header, title, description, content and footer sections for grouping related content like stats, summaries, and previews.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Card to your project and fits it to your theme.

Code

How Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import Card, { CardHeader, CardTitle, CardContent } from "@/components/ui/card";

const fields: [string, string][] = [
  ["Package", "—"],
  ["Address", "Los Angeles, CA"],
  ["Shipping Address", "San Francisco, CA"],
  ["Contact Number", "N/A"],
  ["Business Name", "TechCorp"],
  ["Total Spend", "$50.00"],
  ["Customer Segments", "5"],
];

export default function CardDetailFieldsDemo() {
  return (
    <Card className="w-full max-w-md overflow-hidden">
      <CardHeader>
        <CardTitle>Contact Fields</CardTitle>
      </CardHeader>
      <CardContent>
        <dl className="grid gap-2 text-sm">
          {fields.map(([label, value]) => (
            <div key={label} className="flex justify-between gap-4">
              <dt className="text-ink">{label}</dt>
              <dd className="text-right text-ink-light">{value}</dd>
            </div>
          ))}
        </dl>
      </CardContent>
    </Card>
  );
}

More by Mahmoud Ilyan

View all
  • Steps

    Steps

    5
  • Chart

    Chart

    2
  • Radio Card

    Radio Card

    1
  • Switch

    Switch

    1
  • Input

    Input

    1
  • Badge

    Badge

    1
  • Textarea

    Textarea

  • Tabs

    Tabs

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Statistics Card 7

    Statistics Card 7

    334
  • Photo Deck

    Photo Deck

    39
  • Approval Card

    Approval Card

    33
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    700
  • Statistics Card 10

    Statistics Card 10

    300
  • Product List 01

    Product List 01

    32
  • Weather Card

    Weather Card

    66