Installation
One package, named after your framework. The switcher in the header picks it.
npm install @comvi/reactnpm install @comvi/nextnpm install @comvi/vuenpm install @comvi/nuxtnpm install @comvi/sveltenpm install @comvi/solidnpm install @comvi/coreEach binding depends on @comvi/core, so the core arrives with it and you do not list it
yourself. pnpm add, yarn add and bun add take the same package name.
Packages
Section titled “Packages”| Framework | Package | Peer dependencies | Guide |
|---|---|---|---|
| Vanilla JavaScript | @comvi/core |
none | Vanilla |
| React | @comvi/react |
react |
React |
| Next.js | @comvi/next |
next, react |
Next.js |
| Vue | @comvi/vue |
vue |
Vue |
| Nuxt | @comvi/nuxt |
nuxt |
Nuxt |
| Svelte | @comvi/svelte |
svelte |
Svelte |
| Solid | @comvi/solid |
solid-js |
Solid |
The packages are ESM-only and versioned in lockstep, so install matching versions of every
@comvi/* package you use. Framework and Node ranges are on
Compatibility.
Formatters
Section titled “Formatters”formatNumber, formatDate, formatCurrency, formatRelativeTime and getTextDirection are
exported from @comvi/core and from nowhere else. The versions useI18n() returns are bound to
the i18n instance and need no extra install. A module that imports one of the free functions directly,
a utility file outside any component say, imports it from @comvi/core, and at that point
@comvi/core belongs in your own dependencies rather than arriving as a transitive one.
Read next
Section titled “Read next”- Quick start: render a translated string and switch the locale in your framework.
- Connect to Comvi: load the catalogs from the platform CDN.