コンテンツへスキップ
最終更新:

CardStats Pattern

A section pattern that displays a heading, optional description, and a responsive grid of CardStat components. Designed for showcasing key statistics and metrics on landing pages.

Features

  • Responsive grid layout (2 columns mobile/tablet, 3 columns desktop)
  • Heading with heading-md typography (Tobias Light)
  • Optional description with body-l typography (Booton Light)
  • Proper spacing using PageGrid for container and alignment
  • Full dark mode support
  • Reuses the CardStat component for consistent styling

Usage

import { CardStats } from 'shared/sections/CardStatsList';

<CardStats
  heading="Blockchain Trusted at Scale"
  description="Streamline development and build powerful RWA tokenization solutions with XRP Ledger's comprehensive developer toolset."
  cards={[
    {
      statistic: "12",
      superscript: "+",
      label: "Continuous uptime years",
      variant: "lilac",
      primaryButton: { label: "Learn More", href: "/docs" }
    },
    {
      statistic: "6M",
      superscript: "2",
      label: "Active wallets",
      variant: "light-gray",
      primaryButton: { label: "Explore", href: "/wallets" }
    },
    {
      statistic: "$1T",
      superscript: "+",
      label: "Value transferred",
      variant: "green",
      primaryButton: { label: "View Stats", href: "/stats" }
    },
    // ... more cards
  ]}
/>

Props

PropTypeRequiredDescription
headingReact.ReactNodeYesSection heading text
descriptionReact.ReactNodeNoOptional section description text
cardsCardStatProps[]YesArray of CardStat configurations
classNamestringNoAdditional CSS classes

CardStat Configuration

Each card in the cards array accepts the following props:

PropTypeRequiredDescription
statisticstringYesThe main statistic to display (e.g., "6M", "$1T")
superscript'+' | '*' | '1'-'9' | '0'NoSuperscript text for the statistic
labelstringYesDescriptive label for the statistic
variant'lilac' | 'green' | 'light-gray' | 'dark-gray'NoBackground color variant (default: 'lilac')
primaryButton{ label: string, href?: string, onClick?: () => void }NoPrimary CTA button
secondaryButton{ label: string, href?: string, onClick?: () => void }NoSecondary CTA button

Color Variants

VariantColorHexUse Case
lilacLilac 300#C0A7FFUser metrics, community stats
greenGreen 300#21E46BFinancial metrics, growth indicators
light-grayGray 200#E6EAF0Technical stats, reliability metrics
dark-grayGray 300#CAD4DFNeutral metrics, secondary info

Responsive Behavior

Uses breakpoints from styles/_breakpoints.scss:

BreakpointWidthColumnsCard Gap
xs (Mobile)0 - 575px18px
md (Tablet)576px - 991px28px
lg (Desktop)992px+38px

Examples

With Description

<CardStats
  heading="Blockchain Trusted at Scale"
  description="Streamline development and build powerful RWA tokenization solutions."
  cards={statsCards}
/>

Without Description (Heading Only)

<CardStats
  heading="XRPL Network Statistics"
  cards={statsCards}
/>

Mixed Card Variants

<CardStats
  heading="Why Build on XRPL?"
  cards={[
    { statistic: "12", superscript: "+", label: "Uptime years", variant: "lilac" },
    { statistic: "6M", label: "Active wallets", variant: "green" },
    { statistic: "3-5s", label: "Transaction finality", variant: "light-gray" },
  ]}
/>

CSS Classes

ClassDescription
.bds-card-statsBase section container
.bds-card-stats__headerHeader wrapper for heading and description
.bds-card-stats__headingSection heading (uses .h-md)
.bds-card-stats__descriptionSection description (uses .body-l)
.bds-card-stats__cardsCards grid container
.bds-card-stats__card-wrapperIndividual card wrapper

Design References

  • Figma Design: Section Cards - Stats
  • Showcase Page: /about/card-stats-showcase
  • Pattern Location: shared/sections/CardStatsList/
  • Component Used: shared/components/CardStat/

Accessibility

  • Uses semantic HTML with <section> and proper heading hierarchy
  • CardStat buttons include proper focus states
  • Color contrast meets WCAG AA requirements
  • Responsive layout ensures readability on all devices

Version History

  • Initial implementation: January 2026
  • Figma design alignment with 4 color variants
  • Responsive grid layout with PageGrid integration