Avatar
Avatar, AvatarGroup. They are copied into your app’s ui/ by qatjs add avatar: the code is yours to edit.
Example
LMRƏNHLMRƏ+3
import { Avatar, AvatarGroup } from './ui/avatar/avatar.qx'
export default function Example() {
return (
<p class="example-row">
<Avatar name="Leyla Məmmədova" size={24} />
<Avatar name="Rəşad Əliyev" />
<Avatar name="Nigar Hüseynova" size={40} status="online" />
<AvatarGroup
names={['Leyla Məmmədova', 'Rəşad Əliyev', 'Nigar Hüseynova', 'Orxan Qasımov', 'Aysel Rzayeva']}
max={2}
label="The team"
/>
</p>
)
}Add it
npx qatjs add avatarAvatar
As a custom element: <ui-avatar>.
| Prop | Type | Attribute |
|---|---|---|
name | string | yes |
src | string | yes |
size | 24 | 32 | 40 | property only |
status | 'online' | 'away' | 'busy' | yes |
AvatarGroup
Several people: the first `max` (3 by default), then "+N". As a custom element: <ui-avatar-group>.
| Prop | Type | Attribute |
|---|---|---|
names | string[] | property only |
max | number | yes |
size | 24 | 32 | 40 | property only |
label | string | yes |