Component

ProfileInfoCard

User profile card with avatar slot, name (inline editable), email, roles, and email-verified badge. Each site supplies its own avatar widget.

Read-only

live editor β€” edit to update preview
<ProfileInfoCard
  avatar={<div className="w-16 h-16 rounded-full bg-blue-100 flex items-center justify-center text-2xl">πŸ‘€</div>}
  name="Charlin Joe"
  email="charlin@example.com"
  roles={["admin"]}
  emailVerified={true}
  editingName={false}
  nameInput=""
  saving={false}
  saveError=""
  saveSuccess={false}
  onStartEdit={() => {}}
  onNameInput={() => {}}
  onSaveName={() => {}}
  onCancelEdit={() => {}}
/>

Props

PropTypeDefaultDescription
avatar*ReactNodeβ€”Avatar widget β€” each site provides its own (photo upload, colour picker, etc.).
name*stringβ€”Display name shown in the card.
email*stringβ€”User email address.
roles*string[]β€”Array of role labels shown as badges.
emailVerified*booleanβ€”Shows a verified badge when true.
editingName*booleanβ€”Switches the name into an editable input when true.
nameInput*stringβ€”Controlled value of the name input.
saving*booleanβ€”Disables the save button during the async save.
saveError*stringβ€”Error message shown below the input. Empty string hides it.
saveSuccess*booleanβ€”Shows a success indicator after saving.
onStartEdit*() => voidβ€”Called when the user clicks the edit icon.
onNameInput*(v: string) => voidβ€”Called on every keystroke in the name input.
onSaveName*() => voidβ€”Called when the user confirms the name change.
onCancelEdit*() => voidβ€”Called when the user cancels editing.
onNameKeyDown(e: KeyboardEvent) => voidβ€”Optional β€” handle Enter/Escape key shortcuts.