DS0
Patterns

Account Settings

Account management panel with password change, email change, and danger zone.

Overview

The AccountSettings recipe provides a three-section account management panel: email change, password change, and a danger zone for account deletion. The delete action uses a confirmation Dialog.

Account

Manage account settings.

Change Password

Delete Account

Permanently remove your data

Usage

import { AccountSettings } from '@/recipes/account-settings';

<AccountSettings
  email="john@example.com"
  onChangePassword={({ current, newPassword }) => changePassword(current, newPassword)}
  onChangeEmail={(email) => changeEmail(email)}
  onDeleteAccount={() => deleteAccount()}
/>

API Reference

PropTypeDefaultDescription
emailstringCurrent email
onChangePassword(data: { current: string; newPassword: string }) => voidPassword change handler
onChangeEmail(email: string) => voidEmail change handler
onDeleteAccount() => voidDelete account handler
classNamestringAdditional CSS classes

On this page