Skip to main content
Version: Next

Card

A container component for grouping related content. Supports titles, borders, loading states, and hover effects.

Live Example

Loading component...

Try It

Edit the code below to experiment with the component:

Live Editor
function Demo() {
  return (
    <Card title="Dashboard Overview" bordered>
      This card displays a summary of your dashboard metrics and recent activity.
    </Card>
  );
}
Result
Loading...

Card States

Live Editor
function CardStates() {
  return (
    <div style={{ display: 'flex', gap: 16, flexWrap: 'wrap' }}>
      <Card title="Default" bordered style={{ width: 250 }}>
        Default card content.
      </Card>
      <Card title="Hoverable" bordered hoverable style={{ width: 250 }}>
        Hover over this card.
      </Card>
      <Card title="Loading" bordered loading style={{ width: 250 }}>
        This content is hidden while loading.
      </Card>
      <Card title="No Border" style={{ width: 250 }}>
        Borderless card.
      </Card>
    </div>
  );
}
Result
Loading...

Props

PropTypeDefaultDescription
paddedbooleantrueWhether the card content has padding.
titlestring"Dashboard Overview"Title text displayed at the top of the card.
childrenstring"This card displays a summary of your dashboard metrics and recent activity."The content inside the card.
borderedbooleantrueWhether to show a border around the card.
loadingbooleanfalseWhether to show a loading skeleton.
hoverablebooleanfalseWhether the card lifts on hover.

Import

import { Card } from '@superset/components';

Improve this page

This documentation is auto-generated from the component's Storybook story. Help improve it by editing the story file.