Avatar

Versatile UI element, the Avatar component visually represents users or entities, typically displaying an image or a placeholder graphic.

Import

import { Avatar } from '@vortex-kit/vortex';
import type { AvatarProps } from '@vortex-kit/vortex';

Display

<Avatar src='./ugi.webp' alt='Ugi' />

Allied components

Avatar

Avatar types like WithImage, WithInitials, and WithIcon offer flexible options for representing user profiles with images, initials, or icons, ensuring consistent and adaptable visual elements across applications.

Shared Avatar Props

Prop
Type
Default
type
union
default
size
union
lg
className
union
attributes
object

Avatar With Image

Prop
Type
Default
src
string
initials
string
icon
string
alt
string
onlineIndicator
boolean
verifiedUser
boolean

Avatar With Initials

Prop
Type
Default
initials
string
color
union
neutral
onlineIndicator
boolean

Avatar With Icon

Prop
Type
Default
icon
string
color
union
neutral
onlineIndicator
boolean

Avatar.Aligner

Prop
Type
Default
children
React.ReactNode
align
union
center
direction
union
row
gap
number
3
className
union
attributes
object

Avatar.Content

Prop
Type
Default
children
React.ReactNode
align
union
start
direction
union
column
gap
number
className
union
attributes
object

Avatar Text

Avatar.Title and Avatar.Subtitle share identical properties. However, they differ in text size: Avatar.Title employs a body-md-desktop size, making it larger and more prominent, while Avatar.Subtitle uses a smaller body-xs-desktop size for subtler emphasis.

Prop
Type
Default
children
React.ReactNode
as
keyof React.JSX.IntrinsicElements
p
size
union
weight
union
medium
color
union
default
className
union
attributes
object
Avatar Component Props — Vortex Design System