Avatars are used to represent a user or a brand. They are used in the header, sidebar, and in the chat.
import Avatar from "@radui/ui/Avatar"
const AvatarExample = () => (
<div style={{ display: 'flex', gap: 20 }}>
<Avatar src="https://i.pravatar.cc/1000" />
<Avatar fallback="RU" />
<Avatar fallback="AA" />
</div>
)
Prop | Type | Default | Description |
---|---|---|---|
src | string | null | URL of the image to be displayed as the avatar. |
fallback | string | null | Text initials or placeholder displayed when the image fails to load or if no src is provided. |