Metric
This source is documented by the existing examples linked below.
src/components/Metric.astroUsage contract
- Reuse this composition from its source and demo. Keep its existing semantic structure and locale/data contracts.
- Existing composed portfolio example; reuse its building blocks rather than copying a whole page.
Examples
- metric
<Panel class="max-w-text"><PanelHeader slot="header" path={['Home', t(locale, 'home.proofPath')]} meta={t(locale, 'home.proofCount')} dots />{proof.map((p) => <Metric value={p.value} title={p.title} text={p.text} tag={p.tag} />)}</Panel> - composition
<CompositionD locale={locale} />
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; title: string; text: string; tag?: {label: string; tone: Tone} }Astro.props
Bindings and defaults read from source; these do not add inferred types.
valuetitletexttag
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/Metric.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