Avatar
A compact identity marker for people and accounts.
npx shadcn@latest add @silicon-ui/avatarInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/avatarManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/avatar/avatar.tsx
- components/silicon-ui/avatar/avatar.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/lib/silicon-provider.tsx
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
name* | string | — |
src | string | — |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" |
status | "online" | "offline" | — |
Also accepts the props of HTMLAttributes<HTMLSpanElement>.
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens