@k8ordo/ui

Avatar

A user’s picture. Without an image it shows the fallback text or an icon.

Import

ts
import { Avatar } from '@k8ordo/ui';

Usage

tsx
<Avatar name="Ada Lovelace" />

With an image

k8o
tsx
<Avatar alt="k8o" src="/k8o.jpg" />

Sizes

tsx
<Avatar name="Small" size="sm" />
<Avatar name="Medium" size="md" />
<Avatar name="Large" size="lg" />

Props

alt?
Type: string
Default: -
children?
Type: ReactNode
Default: -
color?
Type: 'base'|'primary'|'secondary'
Default: 'base'
fallback?
Type: string
Default: -
icon?
Type: ReactNode
Default: -
name?
Type: string
Default: -
size?
Type: 'sm'|'md'|'lg'
Default: 'md'
src?
Type: string
Default: -
PropTypeDefault
alt?string-
children?ReactNode-
color?'base'|'primary'|'secondary''base'
fallback?string-
icon?ReactNode-
name?string-
size?'sm'|'md'|'lg''md'
src?string-

Inherited attributes (except the ones set internally): HTMLAttributes<HTMLSpanElement>

k8ordo

React libraries that use Baseline features without holding back.