#108
Initials fallback
Large avatars with no image source: three given only `alt` names and two given explicit `fallback` text.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Initials fallback" pattern (@codeatlasdev/ui demo #108, display/avatar) in my app.
Call get_demo({ ids: ["#108"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Users who have no uploaded photo, shown with initials or a placeholder character.
Keep these library parts, with the props and tokens the demo uses:
- Avatar from "@codeatlasdev/ui"
Behaviour to keep:
- `alt="Alice Martin"`, `alt="Bob Chen"` and `alt="Clara Silva"` with no image
- `fallback="DK"` sets explicit text
- `fallback="?"` sets a placeholder character
- All five use `size="lg"`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Avatar
@codeatlasdev/ui
How it is built
- `alt="Alice Martin"`, `alt="Bob Chen"` and `alt="Clara Silva"` with no image
- `fallback="DK"` sets explicit text
- `fallback="?"` sets a placeholder character
- All five use `size="lg"`
Related
Loading source.