React Intl

React components and hooks for internationalizing apps with locale-aware dates, numbers, lists, and pluralized, translated messages.

Library
npm
v10.1.26
14,748stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
91/100Excellent
Development Activity100
Maintenance96
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture88
Code Quality90
Innovation78
Learning Curve80

React Intl is the React binding for the FormatJS internationalization suite, the most widely used i18n library in the React ecosystem. It provides a component and hook API — <IntlProvider>, <FormattedMessage>, <FormattedDate>, <FormattedNumber>, <FormattedList>, <FormattedRelativeTime>, and the useIntl hook — that wraps the browser’s built-in Intl APIs so dates, numbers, lists, and pluralized messages render correctly for a user’s locale without hand-rolled formatting logic scattered across a codebase.

Beyond formatting, React Intl standardizes how translated strings are declared (defineMessages) and extracted from source via the companion @formatjs/cli and babel-plugin-formatjs tooling, so translation workflows stay mechanical rather than manual. It’s built on the same core (@formatjs/intl, intl-messageformat, @formatjs/icu-messageformat-parser) shared by FormatJS’s Vue, Svelte, and vanilla-JS bindings, giving teams a consistent ICU MessageFormat syntax across frameworks.

What You Get

  • <IntlProvider> root component that scopes locale, messages, and format config to a component tree
  • <FormattedMessage>, <FormattedDate>, <FormattedTime>, <FormattedNumber>, <FormattedList>, <FormattedRelativeTime>, <FormattedDisplayName>, and <FormattedDateTimeRange> components for declarative, locale-aware rendering
  • useIntl hook exposing an imperative intl object (formatMessage, formatDate, formatNumber, etc.) for cases where a React element isn’t suitable, such as aria-label or title attributes
  • defineMessages/defineMessage helpers plus @formatjs/cli and babel-plugin-formatjs for extracting translatable strings straight from source
  • ICU MessageFormat syntax support for pluralization, gender/select formatting, and rich-text message interpolation
  • First-class TypeScript types, including the ability to type message IDs and custom formats against your own message catalog

Common Use Cases

  • Shipping a multi-locale React app where dates, currency, and numbers must render per the visitor’s region
  • Pluralizing and gendering UI copy correctly across languages with very different plural rules
  • Extracting and syncing translatable strings from source into a translation management pipeline
  • Formatting relative timestamps (“2 days ago”) and locale-correct lists (“A, B, and C”) without a bespoke formatter
  • Providing translated aria/title attribute strings where a React component can’t be used directly

Under The Hood

Architecture React Intl’s architecture centers on a provider/context pattern: IntlProvider (components/provider.tsx) builds an IntlShape via createIntl.ts and exposes it through IntlContext to the tree, while every Formatted* component is produced by a shared factory (createFormattedComponent.tsx) that wraps an underlying formatter method (formatDate, formatNumber, etc.) instead of reimplementing formatting logic per component — keeping the component layer thin around one formatters core. Message resolution and ICU parsing live one layer down in the shared @formatjs/intl and @formatjs/icu-messageformat-parser packages in the same monorepo, so react-intl itself is essentially a React-specific adapter over framework-agnostic formatting/parsing engines that also back FormatJS’s Vue and Svelte bindings; a change to the core IntlShape contract would ripple through every Formatted* component and useIntl consumer, but adding a new formatted component is typically a thin new wrapper rather than new formatting logic.

Tech Stack Written in TypeScript and distributed as an ESM-first package (type: module, an explicit exports map for . and ./server), it targets React as a peer dependency and depends on sibling workspace packages (@formatjs/icu-messageformat-parser, @formatjs/intl, intl-messageformat) inside a large pnpm/Bazel monorepo. Testing runs on Vitest, and releases are automated through release-please in CI, which versions and publishes each FormatJS package independently.

Code Quality The package carries an extensive unit-test suite covering individual components and hooks, plus dedicated integration tests, and — notably — separate TypeScript type-checking test suites that verify the public type surface itself against multiple supported React versions, a level of type-safety testing uncommon even in well-tested libraries. Source is fully typed, uses explicit invariant-style assertions rather than silently swallowing misconfiguration (a missing IntlProvider throws a descriptive error rather than failing silently), and the monorepo enforces linting, formatting, and pre-commit hook checks across all packages in CI.

API Design The defining developer-experience choice is offering the same formatting logic through two parallel surfaces: declarative Formatted* components for typical rendering, and an imperative intl.formatX() call via useIntl for contexts where a React element isn’t usable, such as an aria-label or title attribute — avoiding the common need for a second library to cover that gap. Getting started requires little more than wrapping the app in a single <IntlProvider locale messages>, and TypeScript users can further opt into typed message IDs and custom format names for compile-time checking against their own message catalog.

Used by 17 apps in this directory

Go
54%
Apache 2.0

Authgear

Authentication

2,028

Open-source, self-hostable authentication platform with passkeys, biometric login, SSO, MFA, and GraphQL admin API — a full Auth0/Clerk/Firebase alternative for SaaS and mobile apps.

View details
88
Repo Health
81
Technical
68
Dependency
Built with
Go54%
HTML25%
TypeScript18%
Updated 3 days ago
JavaScript
100%
Other

Automatisch

Automation · No Code Platforms

13,964

Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.

View details
49
Repo Health
78
Technical
63
Dependency
Built with
JavaScript100%
Updated 6 months ago
TypeScript
54%
Other

Focalboard

Productivity · Project Management · Collaboration

26,448

Self-hosted, open source project management with Kanban, table, gallery, and calendar views — a privacy-first alternative to Trello, Notion, and Asana.

View details
57
Repo Health
82
Technical
64
Dependency
Built with
TypeScript54%
Go40%
Updated 3 months ago
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,284

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
66
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,284

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
66
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,284

Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.

View details
98
Repo Health
87
Technical
66
Dependency
Built with
TypeScript98%
Updated yesterday
Ruby
59%
AGPL 3.0

Mastodon

Social Media

50,274

Run your own federated social network on the open ActivityPub standard with no ads, no algorithms, and no corporate control over your community.

View details
95
Repo Health
81
Technical
70
Dependency
Built with
Ruby59%
TypeScript23%
Updated yesterday
TypeScript
51%
Other

Mattermost

Team Chat · Collaboration · Devops

38,999

Open core, self-hosted team collaboration with chat, AI agents, voice calling, and deep DevOps integrations — all under your control.

View details
96
Repo Health
87
Technical
65
Dependency
Built with
TypeScript51%
Go40%
Updated today
TypeScript
51%
Other

Mattermost

Team Chat · Collaboration · Devops

38,999

Open core, self-hosted team collaboration with chat, AI agents, voice calling, and deep DevOps integrations — all under your control.

View details
96
Repo Health
87
Technical
65
Dependency
Built with
TypeScript51%
Go40%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search