Skip to content
Torii docs

Installation

Install the React SDK with your package manager of choice:

Terminal window
bun add @torii-js/torii-react

The SDK targets React 18 and 19:

{
"peerDependencies": {
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
}
}

@torii-js/core is pulled in automatically as a transitive dependency. You only need to install it directly if your package manager doesn’t resolve transitive deps (some monorepos with strict hoisting).

Type declarations ship in the package, no separate @types/... install required. Common types you may want to import directly:

import type {
ToriiProviderProps,
ToriiProviderEvents,
AuthTokens,
AuthState,
ToriiError,
LanguageInput,
AppearanceConfig,
} from '@torii-js/torii-react';

Head to the React quickstart for the six-step walkthrough: .env, <ToriiProvider>, <SignIn>, and the first signed-up user, in under five minutes.