components/Avatar
import { … } from 'zidane-ui'ui/src/components/Avatar.tsx
Components#
AvatarComponent#
Renders one person's face.
function Avatar(props: AvatarProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | AvatarProps | The |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| avatar? | string | The photo's URL. | |
| className? | string | Extra classes on the root. | |
| name | string | The person's name: its first letter shows without a photo. | |
| online? | boolean |
| |
| ring? | boolean | A ring in the surface's color around the face (a stack). | |
| size? | AvatarSize | 'sm' | The face's size. |
| style? | CSSProperties | Inline styles on the root. | |
| typing? | boolean |
|
Interfaces#
AvatarPropsInterface#
Props for Avatar.
interface AvatarPropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| avatar? | string | The photo's URL. | |
| className? | string | Extra classes on the root. | |
| name | string | The person's name: its first letter shows without a photo. | |
| online? | boolean |
| |
| ring? | boolean | A ring in the surface's color around the face (a stack). | |
| size? | AvatarSize | 'sm' | The face's size. |
| style? | CSSProperties | Inline styles on the root. | |
| typing? | boolean |
|
Types#
AvatarSizeType#
The face sizes: sm 20px (a header's stack), md 28px (a card's row).
type AvatarSize = 'sm' | 'md'