Avatar
display
Avatar: a widget that displays user initials with a generated color
Terminal
$termuijs render avatar
Installation
$ bunx termuijs add avatar
Copies the source into src/components/avatar/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Avatar } from '@termuijs/widgets'ts
new Avatar(name: string, style: Partial<Style> = {}, opts: AvatarOptions = {})API Reference
Avatar
| Prop | Type | Required | Description |
|---|---|---|---|
name | string | required | — |
color | Color | optional | Override the dynamically generated color |
shape | 'square' | 'circle' | optional | Shape of the avatar |