SDAIA
SDAIA LogoSDAIA Logo
ComponentsAvatar
IntroductionInstallationFAQBrands
ColorsTypographySpacingRadiusGrid layoutsAll Tokens
All Components
AccordionActivityArea ChartAudio PlayerAvatarAvatarGroupCarousel ImageChartChipCode SnippetColumn ChartContext MenuDigital StampDividerDonut ChartDraggable ListDropdownEmpty StateFiltrationFooterImage ViewerLine ChartListMedia GalleryMenuMetricNav BarNav HeaderNumberPDF ViewerPie ChartPopoverProgress CircleQuoteRadial StepperScatterSecond Nav HeaderSlideout MenuStructured ListTableTable of ContentTree ViewVertical TabsVideo Player
BreadcrumbButtonButton MenuButton SplitContent SwitcherDate PickerFloating ButtonHorizontal TabsLinkModalPaginationRadio ButtonSwitchTag
AutocompleteCheckboxFile UploadNumber InputRange SliderRich Text EditorSelectSignatureSliderText AreaText Input
AlertsBadgeCardFeedbackFeedback OverviewHelp IconLoading IndicatorNotification BannerNotification PopupNotificationsProgress BarRatingRating OverviewSkeletonSkeleton/AvatarsTooltip
Sdaia Logo Animation
Sdaia Touch ButtonsSdaia Touch Switch

Avatar

Avatar component for building consistent, accessible interfaces.

Loading preview…
1'use client';
2
3import { Avatar } from 'sdaia-ui';
4
5const IMG = '/svgs/SaudiAvatar.svg';

Installation

npx sdaia-ui@latest add avatar

Usage

import { Avatar } from "@/components/ui/avatar"
<Avatar size="sm" type="initials" initials="AB" statusDot />

Examples

Image

Avatar displaying a user profile photo.

Loading preview…
1<Avatar size="md" type="image" src="https://your-cdn.example/user.jpg" alt="User avatar" statusDot />

Initials

Avatar showing user initials when no photo is available.

Loading preview…
1<Avatar size="md" type="initials" initials="AB" statusDot />

Icon

Avatar with a generic person icon as a fallback.

Loading preview…
1<Avatar size="md" type="icon" statusDot />

Sizes

Avatars are available in sm, md, lg and xl sizes.

Loading preview…
1<Avatar size="sm" type="initials" initials="AB" />
2<Avatar size="md" type="initials" initials="AB" />
3<Avatar size="lg" type="initials" initials="AB" />
4<Avatar size="xl" type="initials" initials="AB" />

Shape

Choose between Circular and Rounded square shapes.

Loading preview…
1<Avatar size="md" type="initials" shape="round" initials="AB" />
2<Avatar size="md" type="initials" shape="square" initials="AB" />

API Reference

AvatarProps

Props for the Avatar component.

Prop

Type

Default

Required

size

'sm' | 'md' | 'lg' | 'xl'

'md'

optional

type

'initials' | 'icon' | 'image'

'initials'

optional

shape

'round' | 'square'

'round'

optional

initials

string

-

optional

src

string

-

optional

alt

string

''

optional

icon

ReactNode

-

optional

statusDot

boolean

false

optional

background

boolean

true

optional

border

boolean

true

optional
Audio Player
AvatarGroup
On this page
Nora Al-Harbi

Nora Al-Harbi

Senior Product Designer

SDAIA · Riyadh, Saudi Arabia

24Projects
138Contributions
62Reviews
User avatar
User avatar
User avatar
User avatar
AB
AB
AB
AB
AB
AB
AB
AB
AB
User avatar
AB
User avatar