StatCard
This source is documented by the existing examples linked below.
src/components/StatCard.astroUsage contract
- Reuse this composition from its source and demo. Keep its existing semantic structure and locale/data contracts.
- Reuse this composition from its source and demo. Keep its existing semantic structure and locale/data contracts.
Examples
- layout-more
<Band><Bento>{proof.map((p) => <StatCard value={p.value} label={p.title} tag={p.tag} />)}</Bento></Band> <CaseShell> <p slot="rail" class="font-mono text-label uppercase tracking-wide text-ink-subtle">{t(locale, 'ds.rail')}</p> <p class="text-ink-muted">{t(locale, 'ds.cardBody')}</p> </CaseShell> - stat-card
<Grid cols={3}><StatCard value={t(locale, 'stat.1.v')} label={t(locale, 'stat.1.k')} /><StatCard value={t(locale, 'stat.2.v')} label={t(locale, 'stat.2.k')} /><StatCard value={proof[1].value} label={proof[1].title} tag={proof[1].tag} /></Grid>
API
Extracted from the source with the TypeScript parser. Inherited and imported types remain references; implementation is authoritative.
type Tone = 'neutral' | 'brand' | 'ok' | 'warn' | 'danger';interface Props { value: string; label: string; tag?: {label: string; tone: Tone} }Astro.props
Bindings and defaults read from source; these do not add inferred types.
valuelabeltag
Source usage
Docs / preview only
This is static source evidence. A reachable module may contain conditional or unused branches. External consumers and staged static pages are outside this scan. No status authorizes deletion.
Documentation
- src/pages/design-system/[category].astro
- src/components/ds/DesignSystemPage.astro
- src/components/ds/DataDemos.astro
- src/components/StatCard.astro
Website · Import path only: src/pages/en/work/[id].astro → src/components/case/CasePage.astro → src/components/case/CaseBlock.astro → src/components/case/CaseData.astro → src/components/StatCard.astro
Preview · Import path only: src/pages/vorschlag/cases/[id].astro → src/components/case/CasePage.astro → src/components/case/CaseBlock.astro → src/components/case/CaseData.astro → src/components/StatCard.astro
Consumers in source
Direct static, dynamic and type imports. Imports do not prove that a branch renders or that a proposal is published.
Dependencies
@/components/ui/badge·src/components/ui/badge.tsx