Componentdata1.22 KB gzipZero dependencies
Profile Settings
Profile settings with avatar slot, fields and animated danger zone.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add profile-settingsOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { ProfileSettings } from "@/components/ui/profile-settings"; <ProfileSettings />Source code
profile-settings.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxprofile-settings.tsx108 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ProfileSettingsProps extends React.HTMLAttributes<HTMLDivElement> { name?: string; email?: string; initials?: string; onSave?: (data: { name: string; email: string }) => void; onDelete?: () => void; onChangeAvatar?: () => void;} /** Profile settings page: avatar + personal info + danger zone. */export function ProfileSettings({ name = "Your Name", email = "you@example.com", initials = "YN", onSave, onDelete, onChangeAvatar, className, ...props }: ProfileSettingsProps) { const [n, setN] = React.useState(name); const [e, setE] = React.useState(email);Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { ProfileSettings } from "@/components/ui/profile-settings"; <ProfileSettings />| Prop | Type | Description |
|---|---|---|
| name | string | Form field name submitted during form serialization. (Default: "Your Name") |
| string | Configures email. (Default: "you@example.com") | |
| initials | string | Configures initials. (Default: "YN") |
| onSave | (data: { name: string; email: string }) => void | Callback invoked on save. |
| onDelete | () => void | Callback invoked on delete. |
| onChangeAvatar | () => void | Callback invoked on change avatar. |