Desk
On the desk
Initials on paper. No photograph required.
RVNR
Identifies a person or group. 32px image or initials; broken images fall back automatically.
On the desk
Initials on paper. No photograph required.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { Avatar, AvatarRow } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/avatar.
npx @noorddev/vlak-cli add avatar
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/avatar.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { Avatar, AvatarRow } from "@noorddev/vlak-react";
<Avatar src="/renn.jpg" name="Renn" initials="RV" size="lg" />
<AvatarRow>
<Avatar name="Renn" initials="RV" />
<Avatar name="Noord" initials="NO" />
<Avatar initials="+3" alt="" />
</AvatarRow>| Prop | Type | Default | Description |
|---|---|---|---|
src | string | ||
alt | string | Image text. Defaults to `name`, then `initials`; pass "" for a decorative avatar. | |
name | string | Who this is. Names the image, and the initials when there is no image. | |
initials | string | Shown when there is no image, or when it fails to load. | |
size | "sm" | "md" | "lg" | "md" |
Also accepts HTMLAttributes<HTMLSpanElement>.
Overlapping row with paper seams.
Also accepts HTMLAttributes<HTMLDivElement>.
<div class="rs-avatar-row"><span class="rs-avatar">RV</span><span class="rs-avatar">NO</span><span class="rs-avatar">+3</span></div>