Installation
Install the React SDK with your package manager of choice:
bun add @torii-js/torii-reactnpm install @torii-js/torii-reactpnpm add @torii-js/torii-reactyarn add @torii-js/torii-reactPeer dependencies
Section titled “Peer dependencies”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).
TypeScript
Section titled “TypeScript”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';Next: wire it up
Section titled “Next: wire it up”Head to the React quickstart
for the six-step walkthrough: .env, <ToriiProvider>, <SignIn>,
and the first signed-up user, in under five minutes.