kuratlielia

Expandable Card

Cards 21

About

A collapsible content card with a header trigger that smoothly morphs its width and height open to reveal more detail, built for dense dashboards or FAQ-style summaries.

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

Code

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

Usage.tsx

import { ExpandableCard } from "@/components/ui/expandable-card";

export default function ExpandableCardDemo() {
  return (
    <div className="flex w-full items-center justify-center p-10">
      <ExpandableCard
        title="What's included in the Pro plan?"
        description="Unlimited projects, priority support, and analytics."
        width={420}
        expandedWidth={520}
      >
        <p>
          The Pro plan includes unlimited projects, priority support with a
          4-hour response time, advanced analytics dashboards, and access to
          every integration we ship. Upgrade or downgrade at any time from your
          billing settings.
        </p>
      </ExpandableCard>
    </div>
  );
}

Dependencies

More by kuratlielia

View all
  • Activity Heatmap

    Activity Heatmap

    516
  • Image Compare

    Image Compare

    199
  • Stats Band

    Stats Band

    150
  • User Menu

    User Menu

    114
  • Date Range Picker

    Date Range Picker

    100
  • Usage Meter

    Usage Meter

    79
  • Ridgeline Chart

    Ridgeline Chart

    63
  • Timeline

    Timeline

    59

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