Skip to content
Torii docs

UserDashboard

<UserDashboard> is a ready-made account page. It wraps <UserProfile> in a titled header that also embeds a <UserButton>, so a single component gives you a complete “My account” screen.

Use it when you want a finished account page with one component. If you only need the sectioned editor without the page chrome, use <UserProfile> directly.

import { SignedIn, UserDashboard } from '@torii-js/torii-react';
function AccountPage() {
return (
<SignedIn>
<UserDashboard title="My account" />
</SignedIn>
);
}
PropTypeDescription
titlestringDashboard heading. Defaults to the localised “Account” label.
onUpdateSuccess(profile: UserProfileData) => voidFired after a successful profile update, with the full updated profile.
onUpdateError(error: ToriiError) => voidFired on a profile-update error; branch on error.code, show error.message.
labelsPartial<ToriiSignupLabels>Per-instance label overrides. Falls through to ToriiProvider labels.
showLanguagebooleanWhether the inline profile shows the Language row. Defaults to auto (shown when <ToriiProvider> has more than one language configured).
classNamestringExtra class names for the dashboard wrapper.
  • Requires a provider: render inside <SignedIn> within <ToriiProvider>.
  • Composition: the header hosts the title and a <UserButton> (in navigation mode, just avatar + sign-out, since the profile is already inline); the body is a <UserProfile>. Profile-update callbacks bubble up from the embedded card. Language switching lives in the profile’s Language row on the Profile section, shown when the provider has more than one languages entry.

Honours the appearance prop on <ToriiProvider>. See theming and elements.

import type { UserDashboardProps } from '@torii-js/torii-react';