UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

29 lines (28 loc) 1.44 kB
/** * OcAvatar - A component for displaying user avatars with support for images, initials, and accessible labels. * * @prop {string} [src] - The source URL of the avatar image. If not provided or if the image fails to load, initials will be displayed instead. * @prop {string} [userName=''] - The name of the user. Used to generate initials if no image is provided or the image fails to load. * @prop {string} [accessibleLabel=''] - An accessible label for the avatar. If empty, the avatar will be hidden from assistive technologies. * @prop {number} [width=50] - The width and height of the avatar in pixels. Defaults to 50px. * * @example * ```vue * <!-- Avatar with an image --> * <oc-avatar src="https://example.com" accessible-label="accessibleLabel" /> * * <!-- Avatar with user initials --> * <oc-avatar user-name="lorem" accessible-label="lorem" /> * * <!-- Avatar with custom size --> * <oc-avatar user-name="lorem" width="100" accessible-label="lorem" /> * ``` */ interface Props { src?: string; userName?: string; accessibleLabel?: string; width?: number; } declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>; export default _default;