# Avatar (@limerdev/zest) A person's picture or initials: `` (`size` `sm`, `default`, `lg`) holds an `Avatar.Image` (`src`, `alt`) and an `Avatar.Fallback` shown while it loads or when it fails. `Avatar.Badge` marks a status; `Avatar.Group` overlaps several, with an `Avatar.GroupCount` for the rest. - Category: Data display - Import: `import { Avatar } from '@limerdev/zest'` - Bits UI: `Avatar`, https://bits-ui.com/docs/components/avatar - Exports: `Avatar.Root`, `Avatar.Image`, `Avatar.Fallback`, `Avatar.Badge`, `Avatar.Group`, `Avatar.GroupCount` - Use for: Showing who: the person signed in, a row's owner, the people on a project. - Don't: An avatar as a person's only name: show the name too, or give the image `alt`. Decorative pictures: use a plain ``. ```svelte AB ``` Props of `Avatar.Root`: - `delayMs` (`number`, default `0`): The delay in milliseconds to wait before showing the avatar once the image has loaded. This can be used to prevent sudden flickering of the image if it loads quickly. - `loadingStatus` (`"error" | "loading" | "loaded"`, default `'loading'`, bindable): The loading status of the image. If you are confident that the image exists and will load successfully, you can set this to `"loaded"` to skip the loading process (which shows the fallback) and immediately show the image. - `onLoadingStatusChange` (`OnChangeFn`): A callback invoked when the loading status of the image changes. - `size` (`"default" | "sm" | "lg"`, default `'default'`): The avatar's size: `sm` (24px), `default` (32px) or `lg` (40px). Example: Basic Initials show until the picture loads, or when it can't. ```svelte AB AB EL ``` Example: Group A group overlaps avatars; GroupCount stands in for the rest. ```svelte {#each people as initials (initials)} {initials} {/each} +8 ```