Rime

Avatar

Initials on the brand gradient or a neutral disc, in three sizes.

Avatar shows initials, from name or given, on the brand gradient (the signed-in person) or a neutral disc (a record).

Installation

npx shadcn@latest add KezLahd/rime/avatar

Also installs: base.

Usage

import { Avatar } from "@/components/ui";

<Avatar name="Jane Cooper" />

Examples

Sizes and tones

API

Generated from the component's TypeScript types and JSDoc (scripts/gen-ui-registry.mjs), so it always matches the source.

Avatar

Avatar props
PropTypeDefaultDescription
namestringFull name; initials are derived (titles like "Dr" are skipped).
initialsstringExplicit initials, e.g. a customer's "R.T." (dots are dropped).
size"sm" | "md" | "lg""md"
tone"brand" | "neutral""brand"brand = the gradient (the signed-in user). neutral = a record (a customer).
labelstringDecorative when a name sits next to it (the default).
classNamestring

Theme tokens

Per-component tokens are undeclared by default, so the default shown is the fallback the CSS uses. Set one at :root (or in theme.css) to restyle every instance. Live values are read from this page, so they follow the Rime Studio.

Avatar per-component tokens
TokenDefaultLive value
--r-circle50%…

System tokens it reads

Avatar system tokens
TokenDefaultLive value
--brand-deeptokens.css…
--brand-filltokens.css…
--brand-gradienttokens.css…
--brand-linetokens.css…
--ink-inversetokens.css…
--rgb-brandtokens.css…
--shadow-specular-darktokens.css…

Accessibility

  • Decorative by default; pass label when it is the only name on screen.

Do and don't

Do

  • Pair it with the person's name in text.

Don't

  • Don't use it as a button on its own.

For AI agents

This page as markdown, rendered from the same registry entry. Point an agent at it (or add .md to this page's URL), or at /llms.txt for the index.

Open avatar.md