iconpackage.web-types.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-webcomponents Show documentation
Show all versions of vaadin-webcomponents Show documentation
Mvnpm composite: Vaadin webcomponents
The newest version!
{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/icon",
"version": "24.5.3",
"description-markup": "markdown",
"contributions": {
"html": {
"elements": [
{
"name": "vaadin-iconset",
"description": "`` is a Web Component for creating SVG icon collections.",
"attributes": [
{
"name": "name",
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-icon#property-name) property of `vaadin-icon`.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "size",
"description": "The size of an individual icon. Note that icons must be square.\n\nWhen using `vaadin-icon`, the size of the iconset will take precedence\nover the size defined by the user to ensure correct appearance.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
},
{
"name": "theme",
"description": "The theme variants to apply to the component.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
}
],
"js": {
"properties": [
{
"name": "name",
"description": "The name of the iconset. Every iconset is required to have its own unique name.\nAll the SVG icons in the iconset must have IDs conforming to its name.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-icon#property-name) property of `vaadin-icon`.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
},
{
"name": "size",
"description": "The size of an individual icon. Note that icons must be square.\n\nWhen using `vaadin-icon`, the size of the iconset will take precedence\nover the size defined by the user to ensure correct appearance.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
}
],
"events": []
}
},
{
"name": "vaadin-icon",
"description": "`` is a Web Component for displaying SVG icons.\n\n### Icon property\n\nThe `` component is designed to be used as a drop-in replacement for ``.\nFor example, you can use it with `vaadin-icons` like this:\n\n```html\n \n```\n\nAlternatively, you can also pick one of the Lumo icons:\n\n```html\n \n```\n\n### Custom SVG icon\n\nAlternatively, instead of selecting an icon from an iconset by name, you can pass any custom `svg`\nliteral using the [`svg`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-icon#property-svg) property. In this case you can also\ndefine the size of the SVG `viewBox` using the [`size`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-icon#property-size) property:\n\n```js\nimport { html, svg } from 'lit';\n\n// in your component\nrender() {\n const svgIcon = svg` `;\n return html`\n \n `;\n}\n```",
"attributes": [
{
"name": "icon",
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-iconset#property-name) property of `vaadin-iconset`.",
"value": {
"type": [
"string"
]
}
},
{
"name": "src",
"description": "The SVG source to be loaded as the icon. It can be:\n- an URL to a file containing the icon\n- an URL in the format \"/path/to/file.svg#objectID\", where the \"objectID\" refers to an ID attribute contained\n inside the SVG referenced by the path. Note that the file needs to follow the same-origin policy.\n- a string in the format \"data:image/svg+xml,\". You may need to use the \"encodeURIComponent\"\n function for the SVG content passed",
"value": {
"type": [
"string"
]
}
},
{
"name": "symbol",
"description": "The symbol identifier that references an ID of an element contained in the SVG element assigned to the\n`src` property",
"value": {
"type": [
"string"
]
}
},
{
"name": "icon-class",
"description": "Class names defining an icon font and/or a specific glyph inside an icon font.\n\nExample: \"fa-solid fa-user\"",
"value": {
"type": [
"string"
]
}
},
{
"name": "char",
"description": "A hexadecimal code point that specifies a glyph from an icon font.\n\nExample: \"e001\"",
"value": {
"type": [
"string"
]
}
},
{
"name": "ligature",
"description": "A ligature name that specifies an icon from an icon font with support for ligatures.\n\nExample: \"home\".",
"value": {
"type": [
"string"
]
}
},
{
"name": "font-family",
"description": "The font family to use for the font icon.",
"value": {
"type": [
"string"
]
}
},
{
"name": "size",
"description": "The size of an icon, used to set the `viewBox` attribute.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
},
{
"name": "theme",
"description": "The theme variants to apply to the component.",
"value": {
"type": [
"string",
"null",
"undefined"
]
}
}
],
"js": {
"properties": [
{
"name": "icon",
"description": "The name of the icon to use. The name should be of the form:\n`iconset_name:icon_name`. When using `vaadin-icons` it is possible\nto omit the first part and only use `icon_name` as a value.\n\nSetting the `icon` property updates the `svg` and `size` based on the\nvalues provided by the corresponding `vaadin-iconset` element.\n\nSee also [`name`](https://cdn.vaadin.com/vaadin-web-components/24.5.3/#/elements/vaadin-iconset#property-name) property of `vaadin-iconset`.",
"value": {
"type": [
"string"
]
}
},
{
"name": "svg",
"description": "The SVG icon wrapped in a Lit template literal.",
"value": {
"type": [
"Object",
"null",
"undefined"
]
}
},
{
"name": "src",
"description": "The SVG source to be loaded as the icon. It can be:\n- an URL to a file containing the icon\n- an URL in the format \"/path/to/file.svg#objectID\", where the \"objectID\" refers to an ID attribute contained\n inside the SVG referenced by the path. Note that the file needs to follow the same-origin policy.\n- a string in the format \"data:image/svg+xml,\". You may need to use the \"encodeURIComponent\"\n function for the SVG content passed",
"value": {
"type": [
"string"
]
}
},
{
"name": "symbol",
"description": "The symbol identifier that references an ID of an element contained in the SVG element assigned to the\n`src` property",
"value": {
"type": [
"string"
]
}
},
{
"name": "iconClass",
"description": "Class names defining an icon font and/or a specific glyph inside an icon font.\n\nExample: \"fa-solid fa-user\"",
"value": {
"type": [
"string"
]
}
},
{
"name": "char",
"description": "A hexadecimal code point that specifies a glyph from an icon font.\n\nExample: \"e001\"",
"value": {
"type": [
"string"
]
}
},
{
"name": "ligature",
"description": "A ligature name that specifies an icon from an icon font with support for ligatures.\n\nExample: \"home\".",
"value": {
"type": [
"string"
]
}
},
{
"name": "fontFamily",
"description": "The font family to use for the font icon.",
"value": {
"type": [
"string"
]
}
},
{
"name": "size",
"description": "The size of an icon, used to set the `viewBox` attribute.",
"value": {
"type": [
"number",
"null",
"undefined"
]
}
}
],
"events": []
}
}
]
}
}
}