@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
1,396 lines (1,395 loc) • 629 kB
JSON
{
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "components/accordion/accordion.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynAccordion",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
}
],
"slots": [
{
"description": "The accordion's main content. Must be `<syn-details />` elements.",
"name": ""
}
],
"members": [
{
"kind": "field",
"name": "detailsInDefaultSlot",
"type": {
"text": "SynDetails[]"
}
},
{
"kind": "field",
"name": "closeOthers",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether or not multiple `<syn-detail>` elements can be open at the same time.",
"attribute": "close-others"
},
{
"kind": "field",
"name": "contained",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the accordion and the slotted `<syn-details>` as contained elements.",
"attribute": "contained",
"reflects": true
},
{
"kind": "field",
"name": "size",
"type": {
"text": "'medium' | 'large'"
},
"default": "'medium'",
"description": "The size that should be applied to all slotted `<syn-details>` elements",
"attribute": "size",
"reflects": true
},
{
"kind": "method",
"name": "adjustDetailsSize",
"privacy": "private"
},
{
"kind": "method",
"name": "adjustDetailsContained",
"privacy": "private"
},
{
"kind": "method",
"name": "handleSizeChange"
},
{
"kind": "method",
"name": "handleContainedChange"
},
{
"kind": "method",
"name": "handleSlotChange"
},
{
"kind": "field",
"name": "handleAccordionShow",
"privacy": "private"
}
],
"attributes": [
{
"name": "close-others",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether or not multiple `<syn-detail>` elements can be open at the same time.",
"fieldName": "closeOthers"
},
{
"name": "contained",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the accordion and the slotted `<syn-details>` as contained elements.",
"fieldName": "contained"
},
{
"name": "size",
"type": {
"text": "'medium' | 'large'"
},
"default": "'medium'",
"description": "The size that should be applied to all slotted `<syn-details>` elements",
"fieldName": "size"
}
],
"superclass": {
"name": "SynergyElement",
"module": "/src/internal/synergy-element.js"
},
"summary": "Accordions provide the ability to group a list of `<syn-details>`.",
"tagNameWithoutPrefix": "accordion",
"tagName": "syn-accordion",
"customElement": true,
"jsDoc": "/**\n * @summary Accordions provide the ability to group a list of `<syn-details>`.\n *\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-accordion--docs\n * @status stable\n * @since 1.23.0\n *\n * @slot - The accordion's main content. Must be `<syn-details />` elements.\n *\n * @csspart base - The component's base wrapper.\n */",
"documentation": "https://synergy-design-system.github.io/?path=/docs/components-syn-accordion--docs",
"status": "stable",
"since": "1.23.0"
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "SynAccordion",
"module": "components/accordion/accordion.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "components/badge/badge.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynBadge",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
}
],
"slots": [
{
"description": "The badge's content.",
"name": ""
}
],
"members": [
{
"kind": "field",
"name": "localize",
"privacy": "private",
"readonly": true,
"default": "new LocalizeController(this)"
},
{
"kind": "field",
"name": "variant",
"type": {
"text": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'"
},
"default": "'primary'",
"description": "The badge's theme variant.",
"attribute": "variant",
"reflects": true
}
],
"attributes": [
{
"name": "variant",
"type": {
"text": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'"
},
"default": "'primary'",
"description": "The badge's theme variant.",
"fieldName": "variant"
}
],
"superclass": {
"name": "SynergyElement",
"module": "/src/internal/synergy-element.js"
},
"summary": "Badges are used to draw attention and display statuses or counts.",
"tagNameWithoutPrefix": "badge",
"tagName": "syn-badge",
"customElement": true,
"jsDoc": "/**\n * @summary Badges are used to draw attention and display statuses or counts.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-badge--docs\n * @status stable\n * @since 2.0\n *\n * @slot - The badge's content.\n *\n * @csspart base - The component's base wrapper.\n */",
"documentation": "https://synergy-design-system.github.io/?path=/docs/components-syn-badge--docs",
"status": "stable",
"since": "2.0"
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "SynBadge",
"module": "components/badge/badge.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "components/alert/alert.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynAlert",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
},
{
"description": "The container that wraps the optional icon.",
"name": "icon"
},
{
"description": "The container that wraps the alert's main content.",
"name": "message"
},
{
"description": "The close button, an `<syn-icon-button>`.",
"name": "close-button"
},
{
"description": "The close button's exported `base` part.",
"name": "close-button__base"
}
],
"slots": [
{
"description": "The alert's main content.",
"name": ""
},
{
"description": "An icon to show in the alert. Works best with `<syn-icon>`.",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "dependencies",
"type": {
"text": "object"
},
"static": true,
"default": "{ 'syn-icon-button': SynIconButton }"
},
{
"kind": "field",
"name": "autoHideTimeout",
"type": {
"text": "number"
},
"privacy": "private"
},
{
"kind": "field",
"name": "remainingTimeInterval",
"type": {
"text": "number"
},
"privacy": "private"
},
{
"kind": "field",
"name": "countdownAnimation",
"type": {
"text": "Animation | undefined"
},
"privacy": "private"
},
{
"kind": "field",
"name": "hasSlotController",
"privacy": "private",
"readonly": true,
"default": "new HasSlotController(this, 'icon', 'suffix')"
},
{
"kind": "field",
"name": "localize",
"privacy": "private",
"readonly": true,
"default": "new LocalizeController(this)"
},
{
"kind": "field",
"name": "currentToastStack",
"type": {
"text": "HTMLDivElement"
},
"privacy": "private",
"static": true
},
{
"kind": "field",
"name": "toastStack",
"privacy": "private",
"static": true,
"readonly": true
},
{
"kind": "field",
"name": "base",
"type": {
"text": "HTMLElement"
}
},
{
"kind": "field",
"name": "countdownElement",
"type": {
"text": "HTMLElement"
}
},
{
"kind": "field",
"name": "open",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.",
"attribute": "open",
"reflects": true
},
{
"kind": "field",
"name": "closable",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Enables a close button that allows the user to dismiss the alert.",
"attribute": "closable",
"reflects": true
},
{
"kind": "field",
"name": "variant",
"type": {
"text": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'"
},
"default": "'primary'",
"description": "The alert's theme variant.",
"attribute": "variant",
"reflects": true
},
{
"kind": "field",
"name": "duration",
"default": "Infinity",
"description": "The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.",
"attribute": "duration"
},
{
"kind": "field",
"name": "size",
"type": {
"text": "'small' | 'medium' | 'large'"
},
"default": "'medium'",
"description": "The alert's size.",
"attribute": "size",
"reflects": true
},
{
"kind": "field",
"name": "countdown",
"type": {
"text": "'rtl' | 'ltr' | undefined"
},
"privacy": "private",
"description": "Enables a countdown that indicates the remaining time the alert will be displayed.\nTypically used to indicate the remaining time before a whole app refresh."
},
{
"kind": "field",
"name": "remainingTime",
"privacy": "private"
},
{
"kind": "method",
"name": "restartAutoHide",
"privacy": "private"
},
{
"kind": "method",
"name": "pauseAutoHide",
"privacy": "private"
},
{
"kind": "method",
"name": "resumeAutoHide",
"privacy": "private"
},
{
"kind": "method",
"name": "handleCountdownChange",
"privacy": "private"
},
{
"kind": "method",
"name": "handleCloseClick",
"privacy": "private"
},
{
"kind": "method",
"name": "handleOpenChange"
},
{
"kind": "method",
"name": "handleDurationChange"
},
{
"kind": "method",
"name": "show",
"description": "Shows the alert."
},
{
"kind": "method",
"name": "hide",
"description": "Hides the alert"
},
{
"kind": "method",
"name": "toast",
"description": "Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when\ndismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by\ncalling this method again. The returned promise will resolve after the alert is hidden."
}
],
"events": [
{
"description": "Emitted when the alert opens.",
"name": "syn-show",
"reactName": "onSynShow",
"eventName": "SynShowEvent"
},
{
"description": "Emitted after the alert opens and all animations are complete.",
"name": "syn-after-show",
"reactName": "onSynAfterShow",
"eventName": "SynAfterShowEvent"
},
{
"description": "Emitted when the alert closes.",
"name": "syn-hide",
"reactName": "onSynHide",
"eventName": "SynHideEvent"
},
{
"description": "Emitted after the alert closes and all animations are complete.",
"name": "syn-after-hide",
"reactName": "onSynAfterHide",
"eventName": "SynAfterHideEvent"
}
],
"attributes": [
{
"name": "open",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.",
"fieldName": "open"
},
{
"name": "closable",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Enables a close button that allows the user to dismiss the alert.",
"fieldName": "closable"
},
{
"name": "variant",
"type": {
"text": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'"
},
"default": "'primary'",
"description": "The alert's theme variant.",
"fieldName": "variant"
},
{
"name": "duration",
"default": "Infinity",
"description": "The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.",
"fieldName": "duration"
},
{
"name": "size",
"type": {
"text": "'small' | 'medium' | 'large'"
},
"default": "'medium'",
"description": "The alert's size.",
"fieldName": "size"
}
],
"superclass": {
"name": "SynergyElement",
"module": "/src/internal/synergy-element.js"
},
"summary": "Alerts are used to display important messages inline or as toast notifications.",
"tagNameWithoutPrefix": "alert",
"tagName": "syn-alert",
"customElement": true,
"jsDoc": "/**\n * @summary Alerts are used to display important messages inline or as toast notifications.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-alert--docs\n * @status stable\n * @since 2.0\n *\n * @dependency syn-icon-button\n *\n * @slot - The alert's main content.\n * @slot icon - An icon to show in the alert. Works best with `<syn-icon>`.\n *\n * @event syn-show - Emitted when the alert opens.\n * @event syn-after-show - Emitted after the alert opens and all animations are complete.\n * @event syn-hide - Emitted when the alert closes.\n * @event syn-after-hide - Emitted after the alert closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart icon - The container that wraps the optional icon.\n * @csspart message - The container that wraps the alert's main content.\n * @csspart close-button - The close button, an `<syn-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n *\n * @animation alert.show - The animation to use when showing the alert.\n * @animation alert.hide - The animation to use when hiding the alert.\n */",
"documentation": "https://synergy-design-system.github.io/?path=/docs/components-syn-alert--docs",
"status": "stable",
"since": "2.0",
"dependencies": [
"syn-icon-button"
],
"animations": [
{
"name": "alert.show",
"description": "The animation to use when showing the alert."
},
{
"name": "alert.hide",
"description": "The animation to use when hiding the alert."
}
]
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "SynAlert",
"module": "components/alert/alert.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "components/breadcrumb/breadcrumb.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynBreadcrumb",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
}
],
"slots": [
{
"description": "One or more breadcrumb items to display.",
"name": ""
},
{
"description": "The separator to use between breadcrumb items. Works best with `<syn-icon>`.",
"name": "separator"
}
],
"members": [
{
"kind": "field",
"name": "dependencies",
"type": {
"text": "object"
},
"static": true,
"default": "{ 'syn-icon': SynIcon }"
},
{
"kind": "field",
"name": "localize",
"privacy": "private",
"readonly": true,
"default": "new LocalizeController(this)"
},
{
"kind": "field",
"name": "separatorDir",
"privacy": "private"
},
{
"kind": "field",
"name": "defaultSlot",
"type": {
"text": "HTMLSlotElement"
}
},
{
"kind": "field",
"name": "separatorSlot",
"type": {
"text": "HTMLSlotElement"
}
},
{
"kind": "field",
"name": "label",
"type": {
"text": "string"
},
"default": "''",
"description": "The label to use for the breadcrumb control. This will not be shown on the screen, but it will be announced by\nscreen readers and other assistive devices to provide more context for users.",
"attribute": "label"
},
{
"kind": "method",
"name": "getSeparator",
"privacy": "private"
},
{
"kind": "method",
"name": "handleSlotChange",
"privacy": "private"
}
],
"attributes": [
{
"name": "label",
"type": {
"text": "string"
},
"default": "''",
"description": "The label to use for the breadcrumb control. This will not be shown on the screen, but it will be announced by\nscreen readers and other assistive devices to provide more context for users.",
"fieldName": "label"
}
],
"superclass": {
"name": "SynergyElement",
"module": "/src/internal/synergy-element.js"
},
"summary": "Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.",
"tagNameWithoutPrefix": "breadcrumb",
"tagName": "syn-breadcrumb",
"customElement": true,
"jsDoc": "/**\n * @summary Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-breadcrumb--docs\n * @status stable\n * @since 2.0\n *\n * @slot - One or more breadcrumb items to display.\n * @slot separator - The separator to use between breadcrumb items. Works best with `<syn-icon>`.\n *\n * @dependency syn-icon\n *\n * @csspart base - The component's base wrapper.\n */",
"documentation": "https://synergy-design-system.github.io/?path=/docs/components-syn-breadcrumb--docs",
"status": "stable",
"since": "2.0",
"dependencies": [
"syn-icon"
]
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "SynBreadcrumb",
"module": "components/breadcrumb/breadcrumb.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "components/breadcrumb-item/breadcrumb-item.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynBreadcrumbItem",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
},
{
"description": "The breadcrumb item's label.",
"name": "label"
},
{
"description": "The container that wraps the prefix.",
"name": "prefix"
},
{
"description": "The container that wraps the suffix.",
"name": "suffix"
},
{
"description": "The container that wraps the separator.",
"name": "separator"
}
],
"slots": [
{
"description": "The breadcrumb item's label.",
"name": ""
},
{
"description": "An optional prefix, usually an icon or icon button.",
"name": "prefix"
},
{
"description": "An optional suffix, usually an icon or icon button.",
"name": "suffix"
},
{
"description": "The separator to use for the breadcrumb item. This will only change the separator for this item. If you want to change it for all items in the group, set the separator on `<syn-breadcrumb>` instead.",
"name": "separator"
}
],
"members": [
{
"kind": "field",
"name": "hasSlotController",
"privacy": "private",
"readonly": true,
"default": "new HasSlotController(this, 'prefix', 'suffix')"
},
{
"kind": "field",
"name": "defaultSlot",
"type": {
"text": "HTMLSlotElement"
}
},
{
"kind": "field",
"name": "renderType",
"type": {
"text": "'button' | 'link' | 'dropdown'"
},
"privacy": "private",
"default": "'button'"
},
{
"kind": "field",
"name": "href",
"type": {
"text": "string | undefined"
},
"description": "Optional URL to direct the user to when the breadcrumb item is activated. When set, a link will be rendered\ninternally. When unset, a button will be rendered instead.",
"attribute": "href"
},
{
"kind": "field",
"name": "target",
"type": {
"text": "'_blank' | '_parent' | '_self' | '_top' | undefined"
},
"description": "Tells the browser where to open the link. Only used when `href` is set.",
"attribute": "target"
},
{
"kind": "field",
"name": "rel",
"type": {
"text": "string"
},
"default": "'noreferrer noopener'",
"description": "The `rel` attribute to use on the link. Only used when `href` is set.",
"attribute": "rel"
},
{
"kind": "method",
"name": "setRenderType",
"privacy": "private"
},
{
"kind": "method",
"name": "hrefChanged"
},
{
"kind": "method",
"name": "handleSlotChange"
}
],
"attributes": [
{
"name": "href",
"type": {
"text": "string | undefined"
},
"description": "Optional URL to direct the user to when the breadcrumb item is activated. When set, a link will be rendered\ninternally. When unset, a button will be rendered instead.",
"fieldName": "href"
},
{
"name": "target",
"type": {
"text": "'_blank' | '_parent' | '_self' | '_top' | undefined"
},
"description": "Tells the browser where to open the link. Only used when `href` is set.",
"fieldName": "target"
},
{
"name": "rel",
"type": {
"text": "string"
},
"default": "'noreferrer noopener'",
"description": "The `rel` attribute to use on the link. Only used when `href` is set.",
"fieldName": "rel"
}
],
"superclass": {
"name": "SynergyElement",
"module": "/src/internal/synergy-element.js"
},
"summary": "Breadcrumb Items are used inside [breadcrumbs](/components/breadcrumb) to represent different links.",
"tagNameWithoutPrefix": "breadcrumb-item",
"tagName": "syn-breadcrumb-item",
"customElement": true,
"jsDoc": "/**\n * @summary Breadcrumb Items are used inside [breadcrumbs](/components/breadcrumb) to represent different links.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-breadcrumb-item--docs\n * @status stable\n * @since 2.0\n *\n * @slot - The breadcrumb item's label.\n * @slot prefix - An optional prefix, usually an icon or icon button.\n * @slot suffix - An optional suffix, usually an icon or icon button.\n * @slot separator - The separator to use for the breadcrumb item. This will only change the separator for this item. If\n * you want to change it for all items in the group, set the separator on `<syn-breadcrumb>` instead.\n *\n * @csspart base - The component's base wrapper.\n * @csspart label - The breadcrumb item's label.\n * @csspart prefix - The container that wraps the prefix.\n * @csspart suffix - The container that wraps the suffix.\n * @csspart separator - The container that wraps the separator.\n */",
"documentation": "https://synergy-design-system.github.io/?path=/docs/components-syn-breadcrumb-item--docs",
"status": "stable",
"since": "2.0"
}
],
"exports": [
{
"kind": "js",
"name": "default",
"declaration": {
"name": "SynBreadcrumbItem",
"module": "components/breadcrumb-item/breadcrumb-item.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "components/button/button.js",
"declarations": [
{
"kind": "class",
"description": "",
"name": "SynButton",
"cssParts": [
{
"description": "The component's base wrapper.",
"name": "base"
},
{
"description": "The container that wraps the prefix.",
"name": "prefix"
},
{
"description": "The button's label.",
"name": "label"
},
{
"description": "The container that wraps the suffix.",
"name": "suffix"
},
{
"description": "The button's caret icon, an `<syn-icon>` element.",
"name": "caret"
},
{
"description": "The spinner that shows when the button is in the loading state.",
"name": "spinner"
}
],
"slots": [
{
"description": "The button's label.",
"name": ""
},
{
"description": "A presentational prefix icon or similar element.",
"name": "prefix"
},
{
"description": "A presentational suffix icon or similar element.",
"name": "suffix"
}
],
"members": [
{
"kind": "field",
"name": "dependencies",
"type": {
"text": "object"
},
"static": true,
"default": "{ 'syn-icon': SynIcon, 'syn-spinner': SynSpinner }"
},
{
"kind": "field",
"name": "formControlController",
"privacy": "private",
"readonly": true,
"default": "new FormControlController(this, { assumeInteractionOn: ['click'] })"
},
{
"kind": "field",
"name": "hasSlotController",
"privacy": "private",
"readonly": true,
"default": "new HasSlotController(this, '[default]', 'prefix', 'suffix')"
},
{
"kind": "field",
"name": "localize",
"privacy": "private",
"readonly": true,
"default": "new LocalizeController(this)"
},
{
"kind": "field",
"name": "button",
"type": {
"text": "HTMLButtonElement | HTMLLinkElement"
}
},
{
"kind": "field",
"name": "defaultSlot",
"type": {
"text": "HTMLSlotElement"
}
},
{
"kind": "field",
"name": "iconOnly",
"type": {
"text": "boolean"
},
"privacy": "private",
"default": "false"
},
{
"kind": "field",
"name": "hasFocus",
"type": {
"text": "boolean"
},
"privacy": "private",
"default": "false"
},
{
"kind": "field",
"name": "invalid",
"type": {
"text": "boolean"
},
"default": "false"
},
{
"kind": "field",
"name": "title",
"type": {
"text": "string"
},
"default": "''",
"attribute": "title",
"reflects": true
},
{
"kind": "field",
"name": "variant",
"type": {
"text": "'filled' | 'outline' | 'text'"
},
"default": "'outline'",
"description": "The button's theme variant.",
"attribute": "variant",
"reflects": true
},
{
"kind": "field",
"name": "size",
"type": {
"text": "'small' | 'medium' | 'large'"
},
"default": "'medium'",
"description": "The button's size.",
"attribute": "size",
"reflects": true
},
{
"kind": "field",
"name": "caret",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.",
"attribute": "caret",
"reflects": true
},
{
"kind": "field",
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Disables the button.",
"attribute": "disabled",
"reflects": true
},
{
"kind": "field",
"name": "loading",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the button in a loading state.",
"attribute": "loading",
"reflects": true
},
{
"kind": "field",
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.",
"attribute": "type"
},
{
"kind": "field",
"name": "name",
"type": {
"text": "string"
},
"default": "''",
"description": "The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.",
"attribute": "name"
},
{
"kind": "field",
"name": "value",
"type": {
"text": "string"
},
"default": "''",
"description": "The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.",
"attribute": "value"
},
{
"kind": "field",
"name": "href",
"type": {
"text": "string"
},
"default": "''",
"description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
"attribute": "href"
},
{
"kind": "field",
"name": "target",
"type": {
"text": "'_blank' | '_parent' | '_self' | '_top'"
},
"description": "Tells the browser where to open the link. Only used when `href` is present.",
"attribute": "target"
},
{
"kind": "field",
"name": "rel",
"type": {
"text": "string"
},
"default": "'noreferrer noopener'",
"description": "When using `href`, this attribute will map to the underlying link's `rel` attribute. Unlike regular links, the\ndefault is `noreferrer noopener` to prevent security exploits. However, if you're using `target` to point to a\nspecific tab/window, this will prevent that from working correctly. You can remove or change the default value by\nsetting the attribute to an empty string or a value of your choice, respectively.",
"attribute": "rel"
},
{
"kind": "field",
"name": "download",
"type": {
"text": "string | undefined"
},
"description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.",
"attribute": "download"
},
{
"kind": "field",
"name": "form",
"type": {
"text": "string"
},
"description": "The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.",
"attribute": "form"
},
{
"kind": "field",
"name": "formAction",
"type": {
"text": "string"
},
"description": "Used to override the form owner's `action` attribute.",
"attribute": "formaction"
},
{
"kind": "field",
"name": "formEnctype",
"type": {
"text": "'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"
},
"description": "Used to override the form owner's `enctype` attribute.",
"attribute": "formenctype"
},
{
"kind": "field",
"name": "formMethod",
"type": {
"text": "'post' | 'get'"
},
"description": "Used to override the form owner's `method` attribute.",
"attribute": "formmethod"
},
{
"kind": "field",
"name": "formNoValidate",
"type": {
"text": "boolean"
},
"description": "Used to override the form owner's `novalidate` attribute.",
"attribute": "formnovalidate"
},
{
"kind": "field",
"name": "formTarget",
"type": {
"text": "'_self' | '_blank' | '_parent' | '_top' | string"
},
"description": "Used to override the form owner's `target` attribute.",
"attribute": "formtarget"
},
{
"kind": "field",
"name": "validity",
"description": "Gets the validity state object",
"readonly": true
},
{
"kind": "field",
"name": "validationMessage",
"description": "Gets the validation message",
"readonly": true
},
{
"kind": "method",
"name": "handleBlur",
"privacy": "private"
},
{
"kind": "method",
"name": "handleFocus",
"privacy": "private"
},
{
"kind": "method",
"name": "handleClick",
"privacy": "private"
},
{
"kind": "method",
"name": "handleInvalid",
"privacy": "private",
"parameters": [
{
"name": "event",
"type": {
"text": "Event"
}
}
]
},
{
"kind": "method",
"name": "isButton",
"privacy": "private"
},
{
"kind": "method",
"name": "isLink",
"privacy": "private"
},
{
"kind": "method",
"name": "handleSlotChange",
"privacy": "private"
},
{
"kind": "method",
"name": "handleDisabledChange"
},
{
"kind": "method",
"name": "click",
"description": "Simulates a click on the button."
},
{
"kind": "method",
"name": "focus",
"parameters": [
{
"name": "options",
"optional": true,
"type": {
"text": "FocusOptions"
}
}
],
"description": "Sets focus on the button."
},
{
"kind": "method",
"name": "blur",
"description": "Removes focus from the button."
},
{
"kind": "method",
"name": "checkValidity",
"description": "Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid."
},
{
"kind": "method",
"name": "getForm",
"return": {
"type": {
"text": "HTMLFormElement | null"
}
},
"description": "Gets the associated form, if one exists."
},
{
"kind": "method",
"name": "reportValidity",
"description": "Checks for validity and shows the browser's validation message if the control is invalid."
},
{
"kind": "method",
"name": "setCustomValidity",
"parameters": [
{
"name": "message",
"type": {
"text": "string"
}
}
],
"description": "Sets a custom validation message. Pass an empty string to restore validity."
}
],
"events": [
{
"description": "Emitted when the button loses focus.",
"name": "syn-blur",
"reactName": "onSynBlur",
"eventName": "SynBlurEvent"
},
{
"description": "Emitted when the button gains focus.",
"name": "syn-focus",
"reactName": "onSynFocus",
"eventName": "SynFocusEvent"
},
{
"description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied.",
"name": "syn-invalid",
"reactName": "onSynInvalid",
"eventName": "SynInvalidEvent"
}
],
"attributes": [
{
"name": "title",
"type": {
"text": "string"
},
"default": "''",
"fieldName": "title"
},
{
"name": "variant",
"type": {
"text": "'filled' | 'outline' | 'text'"
},
"default": "'outline'",
"description": "The button's theme variant.",
"fieldName": "variant"
},
{
"name": "size",
"type": {
"text": "'small' | 'medium' | 'large'"
},
"default": "'medium'",
"description": "The button's size.",
"fieldName": "size"
},
{
"name": "caret",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.",
"fieldName": "caret"
},
{
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Disables the button.",
"fieldName": "disabled"
},
{
"name": "loading",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Draws the button in a loading state.",
"fieldName": "loading"
},
{
"name": "type",
"type": {
"text": "'button' | 'submit' | 'reset'"
},
"default": "'button'",
"description": "The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.",
"fieldName": "type"
},
{
"name": "name",
"type": {
"text": "string"
},
"default": "''",
"description": "The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.",
"fieldName": "name"
},
{
"name": "value",
"type": {
"text": "string"
},
"default": "''",
"description": "The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.",
"fieldName": "value"
},
{
"name": "href",
"type": {
"text": "string"
},
"default": "''",
"description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
"fieldName": "href"
},
{
"name": "target",
"type": {
"text": "'_blank' | '_parent' | '_self' | '_top'"
},
"description": "Tells the browser where to open the link. Only used when `href` is present.",
"fieldName": "target"
},
{
"name": "rel",
"type": {
"text": "string"
},
"default": "'noreferrer noopener'",