Skip to content
nexubDesign System
v2.4.0

Components · Avatar

Avatar

StableSince v0.0.1

Displays a user's profile picture with initials fallback.

import { Avatar } from '@nexub/react';

Examples

Default

Sizes

With image

With badge

Props

Props
PropTypeDefaultDescription
srcstring—URL of the profile image.
namestring—Full name used to generate initials when no image is provided.
size'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Controls avatar dimensions.
badgeboolean—Shows a status badge on the avatar.
badgeColorstring—Colour of the status badge.
fallbackReactNode—Custom fallback rendered when the image fails to load and no name is provided.