UserProfile
Full account management with profile, security, sessions, and custom pages.
The <UserProfile> component provides a tabbed account management interface: profile editing, security (MFA, passkeys), active sessions, connected accounts, and organisation memberships. It requires apiUrl on your auth provider for Customer API calls.
Installation
pnpm add @wocha/ui @wocha/reactOr scaffold with the CLI
npx @wocha/cli init --framework nextjsBasic usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
appearance | WochaAppearance | — | Visual customisation |
className | string | — | Additional class name |
sections | ProfileSection[] | All built-in sections | Sections to display |
activeSection | ProfileNavId | "profile" | Currently active section |
onSectionChange | (section) => void | — | Called when the user changes section |
onSave | (data) => void | — | Called after profile save |
passwordSettingsUrl | string | — | URL for hosted password change flow |
hideNavigation | boolean | false | Hide internal tab navigation (use with UserPortal) |
fallback | ReactNode | — | Shown while profile data is loading |
children | ReactNode | — | Composition children (UserProfile.Page, UserProfile.Link) |
ProfileSection is "profile" | "security" | "sessions" | "connections" | "organisations".
Composition API
Add custom sidenav pages alongside built-in sections:
Reorder built-in sections by using section keys as labels:
Theming
Framework notes
| Framework | Requirement |
|---|---|
| React SPA | Set apiUrl in WochaProvider config |
| Next.js | Pass apiUrl to WochaSessionProvider and WochaThemeProvider sdk="nextjs" |
Related
- UserButton — opens profile in modal mode
- UserPortal — sidebar layout wrapper