Avatar
A picture, or initials while it loads, in a disc of glass.
HA
TC
JI
Installation#
pnpmnpmyarnbun
$ pnpm dlx shadcn@latest add @liquikit/avatarNeeds the @liquikit registry in your components.json. Set it up once.
Usage#
import { Avatar } from "@/components/liquikit/avatar"<Avatar src="/maya.jpg" alt="Maya" fallback="MA" size={48} />API Reference#
Avatar
| Prop | Type | Default |
|---|---|---|
theme | "light" | "dark"Light or dark glass. Falls back to the nearest | — |
lens | Partial<LensProfile>Overrides for the lens profile, such as | — |
liquid | numberHow far the glass squashes and stretches as it moves. | — |
src | stringURL of the picture. | — |
alt | stringDescribes the picture. | "" |
fallback | ReactNodeShown while the picture loads, or if it fails. Usually initials. | — |
size | numberDiameter, in pixels. | 40 |
refraction | "interactive" | "always"When the glass bends the page. | "interactive" |