package.web-types.json Maven / Gradle / Ivy
The newest version!
{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/avatar-group",
"version": "24.6.0",
"description-markup": "markdown",
"contributions": {
"html": {
"elements": [
{
"name": "vaadin-avatar-group",
"description": "`` is a Web Component providing avatar group displaying functionality.\n\nTo create the avatar group, first add the component to the page:\n\n```\n \n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-avatar-group#property-items) property to initialize the structure:\n\n```\ndocument.querySelector('vaadin-avatar-group').items = [\n {name: 'John Doe'},\n {abbr: 'AB'}\n];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n----------- | ---------------\n`container` | The container element\n\nSee the [``](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-avatar) documentation for the available\nstate attributes and stylable shadow parts of avatar elements.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `` itself, the following internal\ncomponents are themable:\n\n- `` - has the same API as [``](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-overlay).\n- `` - has the same API as [``](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-list-box).\n- `` - has the same API as [``](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-item).",
"attributes": [
{
"name": "overlay-class",
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "max-items-visible",
"description": "The maximum number of avatars to display. By default, all the avatars are displayed.\nWhen _maxItemsVisible_ is set, the overflowing avatars are grouped into one avatar with\na dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
},
{
"name": "theme",
"description": "The theme variants to apply to the component.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
}
],
"js": {
"properties": [
{
"name": "overlayClass",
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "items",
"description": "An array containing the items which will be stamped as avatars.\n\nThe items objects allow to configure [`name`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-avatar#property-name),\n[`abbr`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-avatar#property-abbr), [`img`](#/elements/vaadin-avatar#property-img)\nand [`colorIndex`](https://cdn.vaadin.com/vaadin-web-components/24.6.0/#/elements/vaadin-avatar#property-colorIndex) properties on the\nstamped avatars, and set `className` to provide CSS class names.\n\n#### Example\n\n```js\ngroup.items = [\n {\n name: 'User name',\n img: 'url-to-image.png',\n className: 'even'\n },\n {\n abbr: 'JD',\n colorIndex: 1,\n className: 'odd'\n },\n];\n```",
"value": {
"type": [
"Array.",
"undefined"
]
}
},
{
"name": "maxItemsVisible",
"description": "The maximum number of avatars to display. By default, all the avatars are displayed.\nWhen _maxItemsVisible_ is set, the overflowing avatars are grouped into one avatar with\na dropdown. Setting 0 or 1 has no effect so there are always at least two avatars visible.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
},
{
"name": "i18n",
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Translation of the anonymous user avatar tooltip.\n anonymous: 'anonymous',\n // Translation of the avatar group accessible label.\n // {count} is replaced with the actual count of users.\n activeUsers: {\n one: 'Currently one active user',\n many: 'Currently {count} active users'\n },\n // Screen reader announcement when user joins group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n joined: '{user} joined',\n // Screen reader announcement when user leaves group.\n // {user} is replaced with the name or abbreviation.\n // When neither is set, \"anonymous\" is used instead.\n left: '{user} left'\n}\n```",
"value": {
"type": [
"AvatarGroupI18n"
]
}
}
],
"events": []
}
}
]
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy