Skip to main content
Location: sabo/src/components/dashboard/section-cards.tsx

When to use

  • Organize dashboard content into visually distinct sections.

Usage

Styling tip

  • Maintain consistent spacing and headings; prefer grid utilities for responsive columns.

Key features

  • Container queries: Uses @container/card to adjust typography based on card width
  • Responsive grid: Adapts from 1 column → 2 columns → 4 columns based on viewport
  • CardAction: Badge positioned in top-right for metrics/trends
  • CardFooter: Additional context or trend descriptions

Steps

1

Choose layout

The component uses responsive grid with container queries: grid-cols-1 @xl/main:grid-cols-2 @5xl/main:grid-cols-4.
Container queries (@container) allow cards to adjust typography based on their own width, not just viewport.
2

Compose metric cards

Each card uses CardHeader (metric label + value + badge), and CardFooter (trend description).
3

Customize metrics

Replace static values with data from your API or Supabase. Use Tabler icons (@tabler/icons-react) for trend indicators.