Park UI

Avatar

A component for displaying user profile images with fallback support.

CB

Installation

Usage

Examples

Sizes

Use the size prop to change the size of the avatar.

CB
CB
CB
CB
CB
CB

Variants

Use the variant prop to change the variant of the avatar.

CB
CB
CB
CB

Shapes

Use the shape prop to change the shape of the avatar.

CB
CB
CB

Fallback

If the image fails to load, the avatar will display the user’s initial. When no name is provided, a generic icon is shown instead.

CB

Colors

Combine the colorPalette prop with some custom logic to dynamically change the color of the avatar.

SN
BL
JL

Ring

Use the outline props to add a ring around the avatar.

CB

Group

The Group component lets you display multiple avatars together. Use the stacking prop to control the order in which avatars overlap.

CS
SA
PK
+3
CS
SA
PK
+3
CS
SA
PK
+3

Badge

Show a badge on the right corner of the avatar by composing the Float and Circle components.

CB

Persona

Here's an example of how to use the Avatar component to display a user persona.

CB

Christian Busch

christian@park-ui.com

Next.js

Here's an example of how to compose the avatar with Next.js Image.

Closed Component

Here's how to setup the avatar for a closed component composition.

Props

Root

Fallback

Image