UNPKG

@vaadin/avatar

Version:
48 lines (43 loc) 1.6 kB
/** * @license * Copyright (c) 2020 - 2025 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js'; import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; import { AvatarMixin } from './vaadin-avatar-mixin.js'; export { AvatarI18n } from './vaadin-avatar-mixin.js'; /** * `<vaadin-avatar>` is a Web Component providing avatar displaying functionality. * * ```html * <vaadin-avatar img="avatars/avatar-1.jpg"></vaadin-avatar> * ``` * * ### Styling * * The following shadow DOM parts are exposed for styling: * * Part name | Description * --------- | --------------- * `abbr` | The abbreviation element * `icon` | The icon element * * The following state attributes are available for styling: * * Attribute | Description * ------------------|------------- * `focus-ring` | Set when the avatar is focused using the keyboard. * `focused` | Set when the avatar is focused. * `has-color-index` | Set when the avatar has `colorIndex` and the corresponding custom CSS property exists. * * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation. */ declare class Avatar extends AvatarMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) {} declare global { interface HTMLElementTagNameMap { 'vaadin-avatar': Avatar; } } export { Avatar };