Components
<UpdateAvatarCard />
The <UpdateAvatarCard />
component is a pre-built UI element for users to easily manage and update their avatar image. It seamlessly integrates with the AuthUIProvider
and utilizes either a custom or built-in avatar upload implementation.

Usage
Here's how to include the <UpdateAvatarCard />
component within your custom settings page. If you don't provide an uploadAvatar
function, the component will store the avatar image as a base64 string in database.
You can optionally provide uploadAvatar
prop within your AuthUIProvider
:
Reference
These are the available props for <UpdateAvatarCard />
:
Prop | Type | Default |
---|---|---|
className? | string | - |
classNames? | SettingsCardClassNames | - |
isPending? | boolean | - |
localization? | Partial<{ account: string; accounts: string; accountsDescription: string; accountsInstructions: string; addAccount: string; addPasskey: string; alreadyHaveAnAccount: string; avatar: string; avatarDescription: string; ... 87 more ...; verifyYourEmailDescription: string; }> | - |
Styling
The classNames
prop is useful for customizing inner elements using Tailwind classes:
Notes
Avatars are auto-cropped, optimized, and resized before uploading:
- Cropping: The image is automatically center-cropped into a square.
- Sizing: Default
avatarSize
is set to:128px
(when using built-in storage - base64)256px
(when using customuploadAvatar
)
- File Format: You can customize the uploaded image file format via
avatarExtension
prop inAuthUIProvider
. It defaults to"png"
.