Componentdata1.22 KB gzipZero dependencies

Profile Settings

Profile settings with avatar slot, fields and animated danger zone.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add profile-settings

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ProfileSettings } from "@/components/ui/profile-settings"; <ProfileSettings />

Source code

profile-settings.tsx + 1 helper

Zero 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 />
PropTypeDescription
namestringForm field name submitted during form serialization. (Default: "Your Name")
emailstringConfigures email. (Default: "you@example.com")
initialsstringConfigures initials. (Default: "YN")
onSave(data: { name: string; email: string }) => voidCallback invoked on save.
onDelete() => voidCallback invoked on delete.
onChangeAvatar() => voidCallback invoked on change avatar.