Avatar
Avatar component built on Base UI, styled with sc1m tokens.
Live preview
Installation
pnpm dlx shadcn@latest add @sc1m/avatarThis also merges the token layer and installs
src/lib/cn.ts plus @base-ui/react. For the manual route — prerequisites,
components.json, and app-level setup — see Installation.
Usage
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";Composition
Every part is a separate export. Avatar owns state; the rest are
presentational and must appear in this order.
Avatar└── AvatarFallbackExample
The preview above, with its source. This is the demo module verbatim, so the code and the thing it renders cannot drift apart.
<Avatar>
<AvatarFallback>MR</AvatarFallback>
</Avatar>API reference
Each part forwards every prop of its Base UI counterpart; the tables list the ones declared on the part itself. See Base UI's reference for the inherited element props.
AvatarImage
AvatarFallback
Accessibility
Behaviour, focus management, and ARIA wiring come from Base UI's Avatar — see its reference for the full keyboard map.
Design tokens
The component reads semantic tokens only — no raw colour, radius, or duration appears in its source. Override the token, not the component.
Source
src/components/ui/avatar/avatar.tsx — no next/* imports, so it drops into any
React 19 + Tailwind v4 app.
Autocomplete
Autocomplete component built on Base UI, styled with sc1m tokens.
Badge
Badge: a status chip carried by fill alone — a tint of the tone at 12–15%, label inked toward the hue, and a sharp radius from --brand-radius-sm. Five tones (neutral, info, success, warning, danger) plus an optional icon slot. No runtime dependencies.