Format numbers

Installation
SKILL.md

Format Numbers

When editing .tsx files, ensure all user-facing numbers are formatted using the formatNumber utility from @tryghost/shade/utils.

Import

import { formatNumber } from '@tryghost/shade/utils';

When to use formatNumber

Use formatNumber() when rendering any numeric value that is displayed to the user, including:

  • Member counts, visitor counts, subscriber counts
  • Email engagement metrics (opens, clicks, bounces)
  • Revenue amounts (combine with centsToDollars() for monetary values)
  • Post analytics (views, link clicks)
  • Any count or quantity shown in UI
Installs
–
Repository
tryghost/ghost
GitHub Stars
55.6K
First Seen
–