Patterns

Avatar

Colour from the name (same person, same colour); status dot, verified tick, gradient ring, square for organisations.

KANJSIFARHGCBT
KANJSIFA+2

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Avatar, AvatarStack } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Avatar>

src/components/ui/avatar.tsx
PropTypeDefaultDescription
namerequiredstring—
srcstring | null—
sizekeyof typeof sizes"md"
statuskeyof typeof STATUS—
verifiedboolean—
ring"gradient"—
shape"circle" | "square""circle"
classNamestring—

<AvatarStack>

src/components/ui/avatar.tsx
PropTypeDefaultDescription
namesrequiredstring[]—
maxnumber4
sizekeyof typeof sizes"sm"

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui