Avatar
UI SDK Avatar with sizes: a real img that falls back to initials while loading or on error.
Example
- Ada Lovelace
- Grace Hopper
- Linus Torvalds
avatar-demo.tsxCopy code
Installation
Copy code
npm packages
class-variance-authority@0.7.1Usage
ImportCopy code
API reference
Avatar
| Prop | Type | Default |
|---|---|---|
size | "xs" | "sm" | "default" | "lg" | "default" |
Also takes every prop of UI SDK Avatar.
AvatarImage
AvatarFallback
Other exports
avatarVariantstype AvatarPropsAccessibility
- A real img that falls back to initials; hide it when the name is next to it.
Agent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.