Looking at the original seed demo (a big bold "1,000+" stat), the ported
CountUp was impoverished: a plain grouped decimal, no affixes, no currency/
percent — "just a countdown, you don't need an animation for that".
- Component: add the affixes the seed had (`prefix`/`suffix`, each in its own
span) and the FULL `<FormatNumber>` option surface (`formatStyle` currency/
percent/unit · `notation` compact · fraction digits) — delivering the D-T2
"both share the same formatter" promise: a count animates toward a currency,
a percent or a compact value, not just a decimal. Render with
`font-variant-numeric: tabular-nums` inline so digits don't jitter while
counting (no CSS recipe — E-2.2 exception intact).
- Fix a fraction-digits bug: min-fraction inherited the raw value's decimals
(0.999 → "99,900%"); default min to 0 so `maximumFractionDigits` governs.
- Demo: present it as an animated STAT — big/bold/tabular-nums, suffix "+",
a preset row (12.500+ users · $1,2M · 99,9% · ↓3,2s) and format controls.
Verified in real Chrome: "382+" counts to "12.500+"; the $1,2M preset animates
compact EUR ("36,4 mil €" → "1,2 mill €"). Matrix 141/0/0, check clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
<tr><tdclass="name">duration</td><tdclass="type">number (s)</td><tdclass="default">2</td><td>Deriva stiffness/damping del muelle.</td></tr>
<tr><tdclass="name">startWhen</td><tdclass="type">boolean</td><tdclass="default">true</td><td>Gate adicional al viewport.</td></tr>
<tr><tdclass="name">useGrouping</td><tdclass="type">boolean</td><tdclass="default">runtime</td><td>Separador de millares on/off — el locale decide CUÁL.</td></tr>
<tr><tdclass="name">formatStyle</td><tdclass="type">'decimal' | 'currency' | 'percent' | 'unit'</td><tdclass="default">'decimal'</td><td>Mismo vocabulario que <code><FormatNumber></code> — anima hacia una moneda / porcentaje / unidad.</td></tr>
<tr><tdclass="name">currency</td><tdclass="type">ISO 4217</td><tdclass="default">runtime</td><td>Requerido con <code>formatStyle="currency"</code>.</td></tr>
<tr><tdclass="name">unit</td><tdclass="type">string</td><tdclass="default">—</td><td>Requerido con <code>formatStyle="unit"</code> (<code>'byte'</code>…).</td></tr>
<tr><tdclass="name">maximumFractionDigits / minimumFractionDigits</td><tdclass="type">number</td><tdclass="default">auto</td><td>Precisión fraccional del display.</td></tr>
<tr><tdclass="name">prefix / suffix</td><tdclass="type">string</td><tdclass="default">''</td><td>Texto estático alrededor del número (<code>$</code>, <code>+</code>, <code>%</code>…) en su propio span.</td></tr>
<tr><tdclass="name">locale</td><tdclass="type">BCP-47</td><tdclass="default">runtime</td><td>Override por instancia (tercer arg del runtime).</td></tr>