Searching Puzzle Pieces

Type to search Puzzle Pieces.

Avatar

An image with a graceful fallback. A valid image renders directly; if it fails to load it falls back to the name's initials on a colored disc, and with no name at all it shows a neutral person glyph.

Ada LovelaceGH

Installation

Copy the piece into your app — it compiles with your build and the code is yours:

puzzle add piece avatar

Requires the pieces.css tokens merged into your app styles (see Introduction).

Usage

import Avatar from '@/components/ui/Avatar.pzl';
<Avatar src={ user.photo } name="Ada Lovelace" size="lg" />

Fallback colors

ALGHATKJLTBL

Sizes

ALALAL