# Verified profile settings

A shadcn/ui profile settings block for creator and SaaS apps: handle, bio, social links and privacy, with email and phone changes verified by a code.

> 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:** Account settings for newsletters and creator apps; Profile pages with social links and handles; Apps that verify email and phone changes; SaaS settings pages with a settings sidebar
- **Category:** Settings & account › Profile · **Type:** Settings, Forms · **Style:** Motion, Minimal, Dark mode
- **See it:** [Live preview](https://www.craftui.space/docs/blocks/profile-settings-03) · [Screenshot](https://www.craftui.space/llms.md/preview/profile-settings-03.b5188ef1.jpg)

![Verified profile settings](https://www.craftui.space/llms.md/preview/profile-settings-03.b5188ef1.jpg)

## Install

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

This is a paid item (BLK-YQKQY9): 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 ProfileSettings03 from "@/components/blocks/profile-settings-03/profile-settings-03";

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

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

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValues` | `PersonalInfo` | — | The details as they're saved now. Defaults to a demo person (Sam Davies). |
| `onSaveName` | `(firstName: string, lastName: string) => Promise<void>` | — | Saves a changed name. Reject to keep it and show "Name not saved". Defaults to a 0.7s demo save. |
| `onPhotoChange` | `(file: File \| null) => Promise<string \| null>` | — | Stores a picked photo and resolves to its URL; `null` removes it. The photo saves straight away. Defaults to a local preview (nothing is uploaded). |
| `emailFlow` | `CodeFlow` | — | Sends and checks codes for a new email. Defaults to a demo: any code works except 000000. |
| `phoneFlow` | `CodeFlow` | — | The same for a new phone number. Defaults to the same demo. |
| `onSaveHandle` | `(handle: string) => Promise<void>` | — | Saves a new handle. Defaults to a 0.7s demo save. |
| `checkHandle` | `(handle: string) => Promise<boolean>` | — | Resolves `true` when a handle is free (called 400ms after typing stops). Defaults to a demo where admin, acme, sam and support are taken. |
| `handleSuggestions` | `string[]` | — | Handles offered in the chooser. Defaults to two made from the name. |
| `onSaveBio` | `(bio: string) => Promise<void>` | — | Saves the bio. Defaults to a 0.7s demo save. |
| `bioMaxLength` | `number` | — | Longest bio, in characters. Defaults to 160. |
| `socialNetworks` | `SocialNetwork[]` | — | The networks in Social links, in order. Defaults to X, Instagram, LinkedIn, GitHub, YouTube, TikTok, Bluesky and Website. |
| `onSaveSocial` | `(networkId: string, value: string) => Promise<void>` | — | Saves one social link (empty removes it). Defaults to a 0.6s demo save. |
| `accents` | `AccentColor[]` | — | Accent colours offered. Defaults to nine. |
| `onSaveLook` | `(look: ProfileLook) => Promise<void>` | — | Saves the cover and accent colour. Defaults to a 0.7s demo save. |
| `uploadCover` | `(file: File) => Promise<string>` | — | Uploads a picked cover image and resolves to its URL. Defaults to a local preview (nothing is uploaded). |
| `privacyOptions` | `PrivacyOption[]` | — | The switches under Privacy. Defaults to likes, subscriber badge and subscriptions. |
| `onPrivacyChange` | `(optionId: string, value: boolean) => Promise<void>` | — | Saves one privacy switch as soon as it's flipped; reject to flip it back. Defaults to a 0.4s demo save. |
| `phoneCountries` | `PhoneCountry[]` | — | Countries in the phone code list. Defaults to 44 common ones. |
| `title` | `string` | — | The page title. Defaults to "General settings". |
| `tabs` | `PageTab[]` | — | The tabs under the title. Defaults to Personal information, Defaults and Appearance. |
| `activeTab` | `string` | — | Id of the current tab. Defaults to "personal". |
| `shell` | `boolean` | — | Shows the top bar and the settings rail around the page. Set `false` to render only the page inside your own layout. Defaults to `true`. |
| `rail` | `RailGroup[]` | — | The settings rail's groups. Defaults to General, Schedules, Billing and more. |
| `activeRailItem` | `string` | — | Id of the current rail page. Defaults to "personal". |
| `onNavigate` | `RailNavigateHandler` | — | Runs before a rail link or tab is followed: route with your router here. |
| `unread` | `number` | — | Unread notifications; above 0 puts a dot on the bell. Defaults to 2. |
| `avatarMaxMb` | `number` | — | Largest photo, in megabytes. Defaults to 2. |
| `className` | `string` | — | Extra classes for the root element. |

### `PersonalInfo`

| Field | Type | Description |
| --- | --- | --- |
| `avatar` (required) | `string \| null` | Photo URL, or `null` to show initials. |
| `firstName` (required) | `string` | First name, e.g. "Sam". |
| `lastName` (required) | `string` | Last name, e.g. "Davies". |
| `email` (required) | `string` | The verified email they sign in with. |
| `phone` (required) | `string` | The verified phone number, with its country code, e.g. "+91 98765 42121". |
| `handle` (required) | `string` | Handle without the |
| `bio` (required) | `string` | A line or two about the person. |
| `socials` (required) | `Record<string, string>` | Usernames (or a web address for "website") by network id, e.g. { x: "samdavies" }. |
| `look` (required) | `ProfileLook` | The profile's cover image and accent colour. |
| `privacy` (required) | `Record<string, boolean>` | What the profile shows, by option id, e.g. { likes: false }. |

### `CodeFlow`

| Field | Type | Description |
| --- | --- | --- |
| `onSendCode` (required) | `(value: string) => Promise<void>` | Sends a code to the new email or number. Reject to show "Code not sent". |
| `onVerifyCode` (required) | `(value: string, code: string) => Promise<boolean>` | Checks the code for the new value; resolve `false` for a wrong code. |

### `SocialNetwork`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id, also the key in the saved values, e.g. "instagram". |
| `label` (required) | `string` | Name shown above the field, e.g. "Instagram". |
| `icon` (required) | `typeof InstagramIcon` | A Hugeicons icon from `@hugeicons/core-free-icons`. |
| `prefix` | `string` | The address before the username, shown in the field, e.g. "instagram.com/". Leave out for a free web address (Website). |
| `placeholder` (required) | `string` | Example shown in the empty field, e.g. "username". |

### `AccentColor`

| Field | Type | Description |
| --- | --- | --- |
| `name` (required) | `string` | Name read out and shown on hover, e.g. "Teal". |
| `value` (required) | `string` | The colour, any CSS colour, e.g. "#0D9488". |

### `ProfileLook`

| Field | Type | Description |
| --- | --- | --- |
| `cover` (required) | `string \| null` | Cover image URL, or `null` for a wash of the accent colour. |
| `accent` (required) | `string` | The accent colour's value, e.g. "#4F46E5". |

### `PrivacyOption`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id, also the key in the saved values, e.g. "likes". |
| `label` (required) | `string` | What it shows, stated as the ON state, e.g. "Show your likes". |
| `description` (required) | `string` | One line on what people will see. |
| `icon` (required) | `typeof FavouriteIcon` | A Hugeicons icon from `@hugeicons/core-free-icons`. |

### `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". |

### `PageTab`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id; matched against `activeTab`. |
| `label` (required) | `string` | Text on the tab. |
| `href` (required) | `string` | Where the tab goes. |

### `RailGroup`

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

### `RailItem`

| Field | Type | Description |
| --- | --- | --- |
| `id` (required) | `string` | Unique id; matched against `active` to mark the current page. |
| `label` (required) | `string` | Text in the rail, e.g. "Two-factor authentication". |
| `href` (required) | `string` | Where it goes, e.g. "/settings/security". |

## Files

The install adds:

- `components/blocks/profile-settings-03/profile-settings-03.tsx`
- `components/blocks/profile-settings-03/settings-rail.tsx`
- `components/blocks/profile-settings-03/handle-field.tsx`
- `components/blocks/profile-settings-03/verify-popover.tsx`
- `components/blocks/profile-settings-03/code-input.tsx`
- `components/blocks/profile-settings-03/phone-field.tsx`
- `components/blocks/profile-settings-03/social-links.tsx`
- `components/blocks/profile-settings-03/profile-extras.tsx`
- `components/blocks/profile-settings-03/motion.tsx`
- `components/blocks/profile-settings-03/status-button.tsx`
- `components/blocks/profile-settings-03/surface.ts`

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`, `popover`, `radio-group`, `switch`, `textarea`.