UNPKG

@umbraco-ui/uui-avatar

Version:

An avatar web component for displaying user avatars.

55 lines (54 loc) 1.39 kB
import { LitElement } from 'lit'; /** * Avatar for displaying users * @element uui-avatar * @slot - For anything other than initials (no more than 2-3 characters) */ export declare class UUIAvatarElement extends LitElement { /** * Set to true to prevent content from getting hidden if going outside the parent. Useful in combination with something like a Badge. * @type {boolean} * @attr overflow * @default true */ overflow: boolean; /** * Use this to apply a image src * @type {string} * @attr img-src * @default '' */ imgSrc: string; /** * Use this to apply a image srcset * @type {string} * @attr img-srcset * @default '' */ imgSrcset: string; /** * Provide the name used for labels and to generate the initials. * @type {string} * @attr * @default '' */ name: string; /** * Use this to override the initials generated from the name. * @type {string} * @attr * @default undefined */ initials?: string; private get _initials(); connectedCallback(): void; private createInitials; private renderImage; render(): import("lit-html").TemplateResult<1>; static styles: import("lit").CSSResult[]; } declare global { interface HTMLElementTagNameMap { 'uui-avatar': UUIAvatarElement; } }