# Personal details settings

A shadcn/ui settings screen for SaaS and AI apps: a full app sidebar, settings tabs and a personal details form with a country-code phone field.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available for the docs, pricing and about pages: append `.md` to the URL or send an `Accept: text/markdown` header (the home page answers the header too). An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## At a glance

- **Good for:** Settings pages for SaaS and AI apps; Workspace apps with a sidebar and team plans; Account pages with contact and phone details; Admin dashboards and internal tools
- **Category:** Settings & account › Profile · **Type:** Settings, Forms · **Style:** Motion, Minimal, Dark mode
- **See it:** [Live preview](https://www.craftui.space/docs/blocks/profile-settings-02) · [Screenshot](https://www.craftui.space/llms.md/preview/profile-settings-02.ce28d47e.jpg)

![Personal details settings](https://www.craftui.space/llms.md/preview/profile-settings-02.ce28d47e.jpg)

## Install

```bash
pnpm dlx shadcn@latest add https://www.craftui.space/r/profile-settings-02.json
```

This is a paid item (BLK-AR88JJ): the install needs a craftUI plan or a purchase of it. Signed in, the docs page gives your personal install command. Plans: https://www.craftui.space/pricing

## Usage

```tsx
import ProfileSettings02 from "@/components/blocks/profile-settings-02/profile-settings-02";

export default function Page() {
  return <ProfileSettings02 />;
}
```

With no props it renders with demo content; pass your own through the props below.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValues` | `ProfileCardValues` | `built-in demo value` | The profile as it's saved now. Defaults to a demo profile (Sam Davies). |
| `onSave` | `(values: ProfileCardValues) => Promise<void>` | `async () => { await wait(900); }` | Saves the changed profile. Resolve once it's stored; reject to keep the changes and show "Changes not saved". Defaults to a 0.9s demo save. |
| `uploadAvatar` | `(file: File) => Promise<string>` | — | Uploads a picked photo and resolves to its URL, saved with the rest. Defaults to a local preview URL (nothing is uploaded). |
| `title` | `string` | `"Settings"` | Page title above the tabs. Defaults to "Settings". |
| `description` | `string` | `"Manage your profile, security and notifications."` | Line under the title. Defaults to "Manage your profile, security and notifications." |
| `tabs` | `SettingsTab[]` | `DEFAULT_SETTINGS_TABS` | The settings pages shown as tabs. Defaults to General, Personal details, Password & security, Notifications and Billing. |
| `activeTab` | `string` | `"profile"` | Id of the current tab. Defaults to "profile". |
| `onNavigate` | `SettingsTabNavigateHandler` | — | Runs before a tab link is followed: route with your router here. With unsaved changes the block stays and asks to save or cancel first. |
| `avatarMaxMb` | `number` | `2` | Largest photo, in megabytes. Defaults to 2. |
| `overviewMaxLength` | `number` | `280` | Longest overview, in characters. Defaults to 280. |
| `phoneCountries` | `PhoneCountry[]` | `DEFAULT_PHONE_COUNTRIES` | Countries in the phone code list, in order. Defaults to 44 common ones. |
| `shell` | `boolean` | `true` | Wraps the page in an app (sidebar + top bar), the full picture. Set `false` to render only the settings page inside your own layout. Defaults to `true`. |
| `app` | `AppShellSettings` | `DEMO_APP_SHELL` | The app's sidebar and top bar. Defaults to a demo workspace (Acme). |
| `className` | `string` | — | Extra classes for the root element. |

### `ProfileCardValues`

| Field | Type | Description |
| --- | --- | --- |
| `avatar` (required) | `string \| null` | Photo URL, or `null` to show initials. |
| `name` (required) | `string` | Full name, e.g. "Sam Davies". |
| `email` (required) | `string` | The email shown on the profile, e.g. "sam@acme.com". |
| `jobTitle` (required) | `string` | Job title, e.g. "Head of Automation". |
| `company` (required) | `string` | Company or team name. |
| `overview` (required) | `string` | A few lines about the person, shown on their profile. |
| `connectedEmail` (required) | `string` | The email of the connected Google account. Empty for none. |
| `phoneCountry` (required) | `string` | Two-letter country code of the phone number, e.g. "IN" for +91. |
| `phone` (required) | `string` | Phone number without the country code, e.g. "98765 43210". |

### `SettingsTab`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id; matched against `activeTab` to mark the current page. |
| `label` (required) | `string` | Text on the tab, e.g. "Notifications". |
| `href` (required) | `string` | Where the tab goes, e.g. "/settings/notifications". |

### `PhoneCountry`

| Field | Type | Description |
| --- | --- | --- |
| `code` (required) | `string` | ISO 3166 two-letter code, e.g. "IN". Also gives the flag and name. |
| `dial` (required) | `string` | International dialling code, e.g. "+91". |

### `AppShellSettings`

| Field | Type | Description |
| --- | --- | --- |
| `brandName` (required) | `string` | Product name next to the logo, e.g. "Acme". |
| `logo` | `React.ReactNode` | Your logo, about 24px. Defaults to a monogram of `brandName`. |
| `workspaces` | `ShellWorkspace[]` | Workspaces in the brand menu at the top of the sidebar; the current one is `brandName`. Leave out for a plain brand row. |
| `onSwitchWorkspace` | `(id: string) => void` | Switches to another workspace. |
| `onInvite` | `() => void` | Opens your invite flow. |
| `onNewWorkspace` | `() => void` | Starts creating a workspace. |
| `groups` (required) | `ShellNavGroup[]` | The sidebar's link groups. |
| `activeItem` (required) | `string` | Id of the current sidebar link. |
| `runs` (required) | `ShellRun[]` | Recent runs listed under the links; empty hides the list. |
| `usage` | `{ used: number; limit: number; note: string }` | A usage meter above the account, e.g. 891 of 1000 runs. Leave out to hide. |
| `user` (required) | `{ name: string; email: string; avatar: string \| null }` | The signed-in person. |
| `unread` (required) | `number` | Unread notifications; above 0 puts a dot on the bell. |
| `onNavigate` | `(event: React.MouseEvent<HTMLAnchorElement>) => void` | Runs before a sidebar link is followed: route with your router here. |
| `onAskAi` | `() => void` | Opens your assistant. |
| `onUpgrade` | `() => void` | Opens the upgrade flow. |
| `onSignOut` | `() => void` | Signs the person out. |
| `onNewRun` | `() => void` | Starts a new run. |

### `ShellWorkspace`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id. |
| `name` (required) | `string` | Its name, e.g. "Globex". |
| `logo` | `React.ReactNode` | Its logo, about 24px. Defaults to a monogram of `name`. |

### `ShellNavGroup`

| Field | Type | Description |
| --- | --- | --- |
| `label` (required) | `string` | Small heading above the group. |
| `items` (required) | `ShellNavItem[]` | The links in the group, in order. |

### `ShellRun`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id. |
| `name` (required) | `string` | The run's name, e.g. "Lead scoring pipeline". |
| `href` (required) | `string` | Where it opens. |
| `color` (required) | `string` | Its icon's background colour, any CSS colour, e.g. "#F59E0B". |
| `starred` | `boolean` | Whether it's starred. |

### `ShellNavItem`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id; matched against `activeItem` to mark the current page. |
| `label` (required) | `string` | Text in the sidebar, e.g. "Dashboard". |
| `icon` (required) | `typeof DashboardSquare01Icon` | A Hugeicons icon from `@hugeicons/core-free-icons`. |
| `href` (required) | `string` | Where the link goes. |
| `badge` | `string` | A short count at the right, e.g. "28" or "35+". |
| `badgeTone` | `"info" \| "success"` | The badge's colour: "info" (blue) or "success" (green). Defaults to "info". |
| `hot` | `boolean` | Marks a busy or trending page with a small flame. |

## Files

The install adds:

- `components/blocks/profile-settings-02/profile-settings-02.tsx`
- `components/blocks/profile-settings-02/app-shell.tsx`
- `components/blocks/profile-settings-02/settings-tabs.tsx`
- `components/blocks/profile-settings-02/phone-field.tsx`
- `components/blocks/profile-settings-02/surface.ts`
- `components/blocks/profile-settings-02/motion.tsx`
- `components/blocks/profile-settings-02/status-button.tsx`

npm dependencies (installed for you): `@hugeicons/core-free-icons`, `@hugeicons/react`, `motion`.

shadcn/ui components it uses (the shadcn CLI adds any that are missing): `avatar`, `button`, `command`, `dropdown-menu`, `input`, `kbd`, `popover`, `sheet`, `textarea`.