Skip to main content
Version: 2026.04.0

User Profile

Displays the current user's profile with avatar, name, email, and logout.

Preview ยท User Profile

Codeโ€‹

<div class="card" style="max-width:240px;padding:1.25rem;text-align:center">
<div style="width:52px;height:52px;border-radius:50%;background:color-mix(in srgb,var(--primary) 15%,transparent);display:flex;align-items:center;justify-content:center;margin:0 auto 0.75rem;font-size:1.1rem;font-weight:600;color:var(--primary)">JD</div>
<p style="margin:0 0 0.2rem;font-weight:600;font-size:0.9rem">Jane Doe</p>
<p style="margin:0 0 0.75rem;font-size:0.775rem;color:var(--muted-foreground)">jane@acme.com</p>
<span class="badge accent">Enterprise</span>
<div style="margin-top:1rem;padding-top:0.75rem;border-top:1px solid var(--border)">
<button class="ghost small" style="width:100%">Sign out</button>
</div>
</div>

Propsโ€‹

PropTypeDefaultDescription
userUserProfilerequiredUser data to display and edit
onSave(data: Partial<UserProfile>) => voidโ€”Called when the user saves changes
onAvatarChange(file: File) => voidโ€”Called when a new avatar is uploaded

TypeScript interfacesโ€‹

interface UserProfile {
id: string;
email: string;
firstName: string;
lastName: string;
phone?: string;
avatar?: string; // URL
timezone?: string;
language?: string;
}
Version history

See the Changelog for version history and breaking changes.