# Profile Settings

> A profile settings page built from Assembli fields: photo with a cropper, name and pronouns, a username checked for availability as you type, a title, a bio with a soft limit, email with its verification state and a time zone. A live card shows how you'll appear, a save bar rises when anything changes, and a new email waits for its confirmation link.

- Slug: `profile-settings`
- Category: [Settings](https://www.assembli.design/category/settings.md)
- Type: block
- Tags: profile, settings, account, form, avatar, username, email-verification, save-bar
- npm dependencies: lucide-react
- shadcn/ui dependencies: @assembli/avatar-upload, @assembli/username-field, @assembli/text-field, @assembli/email-field, @assembli/autosize-textarea, @assembli/timezone-select, @assembli/unsaved-changes-bar
- Live preview: https://www.assembli.design/preview/profile-settings
- Page: https://www.assembli.design/components/profile-settings

![Profile Settings preview](https://www.assembli.design/thumbnails/profile-settings-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` (required) | `ProfileValue` |  |  |
| `onSave` | `(value: ProfileValue) => Promise<unknown> \| void` |  | Persist the profile. Reject to keep the changes and show an error in the bar. |
| `checkUsername` | `(name: string, signal: AbortSignal) => Promise<AvailabilityResult>` |  | Look a username up while it's typed. Without it every name counts as free. |
| `emailVerified` | `boolean` | `true` | Whether the saved email has been confirmed. |
| `onResendVerification` | `() => Promise<unknown> \| void` |  | Send the confirmation link again. A cooldown follows. |
| `profileUrl` | `string` | `"@"` | Muted text before the username, e.g. "northwind.app/". |
| `bioLimit` | `number` | `160` | Bio limit, in characters. |
| `barStrategy` | `"fixed" \| "absolute"` | `"fixed"` | `fixed` floats the save bar over the viewport; `absolute` pins it to the nearest positioned ancestor. |
| `preview` | `boolean` | `true` | Show the live profile card beside the form on wide screens. |
| `title` | `React.ReactNode` | `"Profile"` |  |
| `description` | `React.ReactNode` | `"How you appear to people in your workspace, and how we rea…` |  |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/profile-settings/profile-settings.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/profile-settings
```

Registry item JSON: https://www.assembli.design/r/profile-settings.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
