Settings Page
ProInstallation
ProSettings Page is a Pro component
Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.
Install with a key
- Add the Pro registry to
components.json:components.json { "registries": { "@uibrik-pro": { "url": "https://uibrik.com/r/pro/{name}.json", "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" } } } } - Put your key in
.env.localand add that file to.gitignore:.env.local UIBRIK_LICENSE=your-license-key - Install it:
Terminal npx shadcn@latest add @uibrik-pro/settings-page
Loading your installation…
Props
SettingsPage- defaultSection
- Type "profile" | "security" | "notifications" | "appearance" | "api-keys" | "billing" | "danger"
- "profile"
- Section shown first when uncontrolled.
- workspaceName
- Type string
- "acme"
- Typed to confirm deleting the workspace.
- section
- Type SettingsSection
- –
- Controlled section. Pair with onSectionChange.
- onSectionChange
- Type (section: SettingsSection) => void
- –
- Called when the nav switches sections.
- defaultValues
- Type Partial<SettingsValues>
- –
- Saved profile, notification and theme values. Discard returns to these.
- apiKeys
- Type ApiKey[]
- –
- Existing keys: { id, name, last4, scope?, createdMinutesAgo, lastUsedMinutesAgo? }.
- sessions
- Type Session[]
- –
- Signed-in devices: { id, device, location, mobile?, activeMinutesAgo, current? }.
- onSave
- Type (values: SettingsValues) => void | Promise<void>
- –
- Persists the draft. The bar shows saving until the promise settles.
- onCreateKey
- Type (name: string, scope: "full" | "read") => string | Promise<string>
- –
- Creates a key and returns its full secret, shown once.
- onRevokeKey
- Type (id: string) => void
- –
- Called after a revoke is confirmed.
- onSignOutSession
- Type (id: string) => void
- –
- Called when a session is signed out.
- onChangePassword
- Type (current: string, next: string) => void | Promise<void>
- –
- Called with a valid password change.
- onDeleteWorkspace
- Type () => void
- –
- Called once the workspace name is typed and delete is confirmed.
- className
- Type string
- –
- Classes for the root.