Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    StatCard

    Shows the value of one measure, its change against a period and an optional trend in one tile.

    Storybook
    Storybook
    Source
    Source

    Added

    • First version: StatCard with the StatCard.Label, StatCard.Value, StatCard.Delta, StatCard.Period, StatCard.Trend and StatCard.Info parts, built on Card.
    • The label, value, delta, period, trend and info props, and parts for a custom layout.
    • Change: arrow, word and colour; sentiment is set independently of the direction.
    • States: loading (placeholder, motion.skeleton, aria-busy), no value (— and a reason), hidden (••••).
    • A changed value fades in with motion.reveal; the number never counts.
    • The part prop types are exported: StatCardLabelProps, StatCardValueProps, StatCardDeltaProps, StatCardPeriodProps, StatCardTrendProps, StatCardInfoProps.

    Changed

    • The card corner radius is 14 px; the placeholder is on the layer fill.