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
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198