UNPKG

@shoelace-style/shoelace

Version:

A forward-thinking library of web components.

943 lines 317 kB
{ "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json", "name": "@shoelace-style/shoelace", "version": "2.18.0", "description-markup": "markdown", "contributions": { "html": { "elements": [ { "name": "sl-alert", "description": "Alerts are used to display important messages inline or as toast notifications.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the alert opens.\n- **sl-after-show** - Emitted after the alert opens and all animations are complete.\n- **sl-hide** - Emitted when the alert closes.\n- **sl-after-hide** - Emitted after the alert closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the alert.\n- **hide()** - Hides the alert\n- **toast()** - 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.\n\n### **Slots:**\n - _default_ - The alert's main content.\n- **icon** - An icon to show in the alert. Works best with `<sl-icon>`.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **icon** - The container that wraps the optional icon.\n- **message** - The container that wraps the alert's main content.\n- **close-button** - The close button, an `<sl-icon-button>`.\n- **close-button__base** - The close button's exported `base` part.", "doc-url": "", "attributes": [ { "name": "open", "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.", "value": { "type": "boolean", "default": "false" } }, { "name": "closable", "description": "Enables a close button that allows the user to dismiss the alert.", "value": { "type": "boolean", "default": "false" } }, { "name": "variant", "description": "The alert's theme variant.", "value": { "type": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'", "default": "'primary'" } }, { "name": "duration", "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.", "value": { "type": "string", "default": "Infinity" } }, { "name": "countdown", "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.", "value": { "type": "'rtl' | 'ltr' | undefined" } } ], "slots": [ { "name": "", "description": "The alert's main content." }, { "name": "icon", "description": "An icon to show in the alert. Works best with `<sl-icon>`." } ], "events": [ { "name": "sl-show", "description": "Emitted when the alert opens." }, { "name": "sl-after-show", "description": "Emitted after the alert opens and all animations are complete." }, { "name": "sl-hide", "description": "Emitted when the alert closes." }, { "name": "sl-after-hide", "description": "Emitted after the alert closes and all animations are complete." } ], "js": { "properties": [ { "name": "open", "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.", "value": { "type": "boolean" } }, { "name": "closable", "description": "Enables a close button that allows the user to dismiss the alert.", "value": { "type": "boolean" } }, { "name": "variant", "description": "The alert's theme variant.", "value": { "type": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'" } }, { "name": "duration", "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.", "value": {} }, { "name": "countdown", "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.", "value": { "type": "'rtl' | 'ltr' | undefined" } } ], "events": [ { "name": "sl-show", "description": "Emitted when the alert opens." }, { "name": "sl-after-show", "description": "Emitted after the alert opens and all animations are complete." }, { "name": "sl-hide", "description": "Emitted when the alert closes." }, { "name": "sl-after-hide", "description": "Emitted after the alert closes and all animations are complete." } ] } }, { "name": "sl-animated-image", "description": "A component for displaying animated GIFs and WEBPs that play and pause on interaction.\n---\n\n\n### **Events:**\n - **sl-load** - Emitted when the image loads successfully.\n- **sl-error** - Emitted when the image fails to load.\n\n### **Slots:**\n - **play-icon** - Optional play icon to use instead of the default. Works best with `<sl-icon>`.\n- **pause-icon** - Optional pause icon to use instead of the default. Works best with `<sl-icon>`.\n\n### **CSS Properties:**\n - **--control-box-size** - The size of the icon box. _(default: undefined)_\n- **--icon-size** - The size of the play/pause icons. _(default: undefined)_\n\n### **CSS Parts:**\n - **control-box** - The container that surrounds the pause/play icons and provides their background.", "doc-url": "", "attributes": [ { "name": "src", "description": "The path to the image to load.", "value": { "type": "string" } }, { "name": "alt", "description": "A description of the image used by assistive devices.", "value": { "type": "string" } }, { "name": "play", "description": "Plays the animation. When this attribute is remove, the animation will pause.", "value": { "type": "boolean" } } ], "slots": [ { "name": "play-icon", "description": "Optional play icon to use instead of the default. Works best with `<sl-icon>`." }, { "name": "pause-icon", "description": "Optional pause icon to use instead of the default. Works best with `<sl-icon>`." } ], "events": [ { "name": "sl-load", "description": "Emitted when the image loads successfully." }, { "name": "sl-error", "description": "Emitted when the image fails to load." } ], "js": { "properties": [ { "name": "src", "description": "The path to the image to load.", "value": { "type": "string" } }, { "name": "alt", "description": "A description of the image used by assistive devices.", "value": { "type": "string" } }, { "name": "play", "description": "Plays the animation. When this attribute is remove, the animation will pause.", "value": { "type": "boolean" } } ], "events": [ { "name": "sl-load", "description": "Emitted when the image loads successfully." }, { "name": "sl-error", "description": "Emitted when the image fails to load." } ] } }, { "name": "sl-animation", "description": "Animate elements declaratively with nearly 100 baked-in presets, or roll your own with custom keyframes. Powered by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).\n---\n\n\n### **Events:**\n - **sl-cancel** - Emitted when the animation is canceled.\n- **sl-finish** - Emitted when the animation finishes.\n- **sl-start** - Emitted when the animation starts or restarts.\n\n### **Methods:**\n - **cancel()** - Clears all keyframe effects caused by this animation and aborts its playback.\n- **finish()** - Sets the playback time to the end of the animation corresponding to the current playback direction.\n\n### **Slots:**\n - _default_ - The element to animate. Avoid slotting in more than one element, as subsequent ones will be ignored. To animate multiple elements, either wrap them in a single container or use multiple `<sl-animation>` elements.", "doc-url": "", "attributes": [ { "name": "name", "description": "The name of the built-in animation to use. For custom animations, use the `keyframes` prop.", "value": { "type": "string", "default": "'none'" } }, { "name": "play", "description": "Plays the animation. When omitted, the animation will be paused. This attribute will be automatically removed when\nthe animation finishes or gets canceled.", "value": { "type": "boolean", "default": "false" } }, { "name": "delay", "description": "The number of milliseconds to delay the start of the animation.", "value": { "type": "number", "default": "0" } }, { "name": "direction", "description": "Determines the direction of playback as well as the behavior when reaching the end of an iteration.\n[Learn more](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction)", "value": { "type": "PlaybackDirection", "default": "'normal'" } }, { "name": "duration", "description": "The number of milliseconds each iteration of the animation takes to complete.", "value": { "type": "number", "default": "1000" } }, { "name": "easing", "description": "The easing function to use for the animation. This can be a Shoelace easing function or a custom easing function\nsuch as `cubic-bezier(0, 1, .76, 1.14)`.", "value": { "type": "string", "default": "'linear'" } }, { "name": "end-delay", "description": "The number of milliseconds to delay after the active period of an animation sequence.", "value": { "type": "number", "default": "0" } }, { "name": "fill", "description": "Sets how the animation applies styles to its target before and after its execution.", "value": { "type": "FillMode", "default": "'auto'" } }, { "name": "iterations", "description": "The number of iterations to run before the animation completes. Defaults to `Infinity`, which loops.", "value": { "type": "string", "default": "Infinity" } }, { "name": "iteration-start", "description": "The offset at which to start the animation, usually between 0 (start) and 1 (end).", "value": { "type": "number", "default": "0" } }, { "name": "playback-rate", "description": "Sets the animation's playback rate. The default is `1`, which plays the animation at a normal speed. Setting this\nto `2`, for example, will double the animation's speed. A negative value can be used to reverse the animation. This\nvalue can be changed without causing the animation to restart.", "value": { "type": "number", "default": "1" } } ], "slots": [ { "name": "", "description": "The element to animate. Avoid slotting in more than one element, as subsequent ones will be ignored. To animate multiple elements, either wrap them in a single container or use multiple `<sl-animation>` elements." } ], "events": [ { "name": "sl-cancel", "description": "Emitted when the animation is canceled." }, { "name": "sl-finish", "description": "Emitted when the animation finishes." }, { "name": "sl-start", "description": "Emitted when the animation starts or restarts." } ], "js": { "properties": [ { "name": "name", "description": "The name of the built-in animation to use. For custom animations, use the `keyframes` prop.", "value": { "type": "string" } }, { "name": "play", "description": "Plays the animation. When omitted, the animation will be paused. This attribute will be automatically removed when\nthe animation finishes or gets canceled.", "value": { "type": "boolean" } }, { "name": "delay", "description": "The number of milliseconds to delay the start of the animation.", "value": { "type": "number" } }, { "name": "direction", "description": "Determines the direction of playback as well as the behavior when reaching the end of an iteration.\n[Learn more](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction)", "value": { "type": "PlaybackDirection" } }, { "name": "duration", "description": "The number of milliseconds each iteration of the animation takes to complete.", "value": { "type": "number" } }, { "name": "easing", "description": "The easing function to use for the animation. This can be a Shoelace easing function or a custom easing function\nsuch as `cubic-bezier(0, 1, .76, 1.14)`.", "value": { "type": "string" } }, { "name": "end-delay", "description": "The number of milliseconds to delay after the active period of an animation sequence.", "value": { "type": "number" } }, { "name": "fill", "description": "Sets how the animation applies styles to its target before and after its execution.", "value": { "type": "FillMode" } }, { "name": "iterations", "description": "The number of iterations to run before the animation completes. Defaults to `Infinity`, which loops.", "value": {} }, { "name": "iteration-start", "description": "The offset at which to start the animation, usually between 0 (start) and 1 (end).", "value": { "type": "number" } }, { "name": "playback-rate", "description": "Sets the animation's playback rate. The default is `1`, which plays the animation at a normal speed. Setting this\nto `2`, for example, will double the animation's speed. A negative value can be used to reverse the animation. This\nvalue can be changed without causing the animation to restart.", "value": { "type": "number" } } ], "events": [ { "name": "sl-cancel", "description": "Emitted when the animation is canceled." }, { "name": "sl-finish", "description": "Emitted when the animation finishes." }, { "name": "sl-start", "description": "Emitted when the animation starts or restarts." } ] } }, { "name": "sl-breadcrumb", "description": "Breadcrumbs provide a group of links so users can easily navigate a website's hierarchy.\n---\n\n\n### **Slots:**\n - _default_ - One or more breadcrumb items to display.\n- **separator** - The separator to use between breadcrumb items. Works best with `<sl-icon>`.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.", "doc-url": "", "attributes": [ { "name": "label", "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.", "value": { "type": "string", "default": "''" } } ], "slots": [ { "name": "", "description": "One or more breadcrumb items to display." }, { "name": "separator", "description": "The separator to use between breadcrumb items. Works best with `<sl-icon>`." } ], "events": [], "js": { "properties": [ { "name": "label", "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.", "value": { "type": "string" } } ], "events": [] } }, { "name": "sl-badge", "description": "Badges are used to draw attention and display statuses or counts.\n---\n\n\n### **Slots:**\n - _default_ - The badge's content.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.", "doc-url": "", "attributes": [ { "name": "variant", "description": "The badge's theme variant.", "value": { "type": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'", "default": "'primary'" } }, { "name": "pill", "description": "Draws a pill-style badge with rounded edges.", "value": { "type": "boolean", "default": "false" } }, { "name": "pulse", "description": "Makes the badge pulsate to draw attention.", "value": { "type": "boolean", "default": "false" } } ], "slots": [{ "name": "", "description": "The badge's content." }], "events": [], "js": { "properties": [ { "name": "variant", "description": "The badge's theme variant.", "value": { "type": "'primary' | 'success' | 'neutral' | 'warning' | 'danger'" } }, { "name": "pill", "description": "Draws a pill-style badge with rounded edges.", "value": { "type": "boolean" } }, { "name": "pulse", "description": "Makes the badge pulsate to draw attention.", "value": { "type": "boolean" } } ], "events": [] } }, { "name": "sl-avatar", "description": "Avatars are used to represent a person or object.\n---\n\n\n### **Events:**\n - **sl-error** - The image could not be loaded. This may because of an invalid URL, a temporary network condition, or some unknown cause.\n\n### **Slots:**\n - **icon** - The default icon to use when no image or initials are present. Works best with `<sl-icon>`.\n\n### **CSS Properties:**\n - **--size** - The size of the avatar. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **icon** - The container that wraps the avatar's icon.\n- **initials** - The container that wraps the avatar's initials.\n- **image** - The avatar image. Only shown when the `image` attribute is set.", "doc-url": "", "attributes": [ { "name": "image", "description": "The image source to use for the avatar.", "value": { "type": "string", "default": "''" } }, { "name": "label", "description": "A label to use to describe the avatar to assistive devices.", "value": { "type": "string", "default": "''" } }, { "name": "initials", "description": "Initials to use as a fallback when no image is available (1-2 characters max recommended).", "value": { "type": "string", "default": "''" } }, { "name": "loading", "description": "Indicates how the browser should load the image.", "value": { "type": "'eager' | 'lazy'", "default": "'eager'" } }, { "name": "shape", "description": "The shape of the avatar.", "value": { "type": "'circle' | 'square' | 'rounded'", "default": "'circle'" } } ], "slots": [ { "name": "icon", "description": "The default icon to use when no image or initials are present. Works best with `<sl-icon>`." } ], "events": [ { "name": "sl-error", "description": "The image could not be loaded. This may because of an invalid URL, a temporary network condition, or some unknown cause." } ], "js": { "properties": [ { "name": "image", "description": "The image source to use for the avatar.", "value": { "type": "string" } }, { "name": "label", "description": "A label to use to describe the avatar to assistive devices.", "value": { "type": "string" } }, { "name": "initials", "description": "Initials to use as a fallback when no image is available (1-2 characters max recommended).", "value": { "type": "string" } }, { "name": "loading", "description": "Indicates how the browser should load the image.", "value": { "type": "'eager' | 'lazy'" } }, { "name": "shape", "description": "The shape of the avatar.", "value": { "type": "'circle' | 'square' | 'rounded'" } } ], "events": [ { "name": "sl-error", "description": "The image could not be loaded. This may because of an invalid URL, a temporary network condition, or some unknown cause." } ] } }, { "name": "sl-breadcrumb-item", "description": "Breadcrumb Items are used inside [breadcrumbs](/components/breadcrumb) to represent different links.\n---\n\n\n### **Slots:**\n - _default_ - The breadcrumb item's label.\n- **prefix** - An optional prefix, usually an icon or icon button.\n- **suffix** - An optional suffix, usually an icon or icon button.\n- **separator** - 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 `<sl-breadcrumb>` instead.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **label** - The breadcrumb item's label.\n- **prefix** - The container that wraps the prefix.\n- **suffix** - The container that wraps the suffix.\n- **separator** - The container that wraps the separator.", "doc-url": "", "attributes": [ { "name": "href", "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.", "value": { "type": "string | undefined" } }, { "name": "target", "description": "Tells the browser where to open the link. Only used when `href` is set.", "value": { "type": "'_blank' | '_parent' | '_self' | '_top' | undefined" } }, { "name": "rel", "description": "The `rel` attribute to use on the link. Only used when `href` is set.", "value": { "type": "string", "default": "'noreferrer noopener'" } } ], "slots": [ { "name": "", "description": "The breadcrumb item's label." }, { "name": "prefix", "description": "An optional prefix, usually an icon or icon button." }, { "name": "suffix", "description": "An optional suffix, usually an icon or icon button." }, { "name": "separator", "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 `<sl-breadcrumb>` instead." } ], "events": [], "js": { "properties": [ { "name": "href", "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.", "value": { "type": "string | undefined" } }, { "name": "target", "description": "Tells the browser where to open the link. Only used when `href` is set.", "value": { "type": "'_blank' | '_parent' | '_self' | '_top' | undefined" } }, { "name": "rel", "description": "The `rel` attribute to use on the link. Only used when `href` is set.", "value": { "type": "string" } } ], "events": [] } }, { "name": "sl-button", "description": "Buttons represent actions that are available to the user.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the button loses focus.\n- **sl-focus** - Emitted when the button gains focus.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **click()** - Simulates a click on the button.\n- **focus(options: _FocusOptions_)** - Sets focus on the button.\n- **blur()** - Removes focus from the button.\n- **checkValidity()** - Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid.\n- **getForm(): _HTMLFormElement | null_** - Gets the associated form, if one exists.\n- **reportValidity()** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message: _string_)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The button's label.\n- **prefix** - A presentational prefix icon or similar element.\n- **suffix** - A presentational suffix icon or similar element.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **prefix** - The container that wraps the prefix.\n- **label** - The button's label.\n- **suffix** - The container that wraps the suffix.\n- **caret** - The button's caret icon, an `<sl-icon>` element.\n- **spinner** - The spinner that shows when the button is in the loading state.", "doc-url": "", "attributes": [ { "name": "title", "value": { "type": "string", "default": "''" } }, { "name": "variant", "description": "The button's theme variant.", "value": { "type": "'default' | 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'text'", "default": "'default'" } }, { "name": "size", "description": "The button's size.", "value": { "type": "'small' | 'medium' | 'large'", "default": "'medium'" } }, { "name": "caret", "description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.", "value": { "type": "boolean", "default": "false" } }, { "name": "disabled", "description": "Disables the button.", "value": { "type": "boolean", "default": "false" } }, { "name": "loading", "description": "Draws the button in a loading state.", "value": { "type": "boolean", "default": "false" } }, { "name": "outline", "description": "Draws an outlined button.", "value": { "type": "boolean", "default": "false" } }, { "name": "pill", "description": "Draws a pill-style button with rounded edges.", "value": { "type": "boolean", "default": "false" } }, { "name": "circle", "description": "Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the\ndefault slot.", "value": { "type": "boolean", "default": "false" } }, { "name": "type", "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.", "value": { "type": "'button' | 'submit' | 'reset'", "default": "'button'" } }, { "name": "name", "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.", "value": { "type": "string", "default": "''" } }, { "name": "value", "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.", "value": { "type": "string", "default": "''" } }, { "name": "href", "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.", "value": { "type": "string", "default": "''" } }, { "name": "target", "description": "Tells the browser where to open the link. Only used when `href` is present.", "value": { "type": "'_blank' | '_parent' | '_self' | '_top'" } }, { "name": "rel", "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.", "value": { "type": "string", "default": "'noreferrer noopener'" } }, { "name": "download", "description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.", "value": { "type": "string | undefined" } }, { "name": "form", "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.", "value": { "type": "string" } }, { "name": "formaction", "description": "Used to override the form owner's `action` attribute.", "value": { "type": "string" } }, { "name": "formenctype", "description": "Used to override the form owner's `enctype` attribute.", "value": { "type": "'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'" } }, { "name": "formmethod", "description": "Used to override the form owner's `method` attribute.", "value": { "type": "'post' | 'get'" } }, { "name": "formnovalidate", "description": "Used to override the form owner's `novalidate` attribute.", "value": { "type": "boolean" } }, { "name": "formtarget", "description": "Used to override the form owner's `target` attribute.", "value": { "type": "'_self' | '_blank' | '_parent' | '_top' | string" } } ], "slots": [ { "name": "", "description": "The button's label." }, { "name": "prefix", "description": "A presentational prefix icon or similar element." }, { "name": "suffix", "description": "A presentational suffix icon or similar element." } ], "events": [ { "name": "sl-blur", "description": "Emitted when the button loses focus." }, { "name": "sl-focus", "description": "Emitted when the button gains focus." }, { "name": "sl-invalid", "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied." } ], "js": { "properties": [ { "name": "title", "value": { "type": "string" } }, { "name": "variant", "description": "The button's theme variant.", "value": { "type": "'default' | 'primary' | 'success' | 'neutral' | 'warning' | 'danger' | 'text'" } }, { "name": "size", "description": "The button's size.", "value": { "type": "'small' | 'medium' | 'large'" } }, { "name": "caret", "description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.", "value": { "type": "boolean" } }, { "name": "disabled", "description": "Disables the button.", "value": { "type": "boolean" } }, { "name": "loading", "description": "Draws the button in a loading state.", "value": { "type": "boolean" } }, { "name": "outline", "description": "Draws an outlined button.", "value": { "type": "boolean" } }, { "name": "pill", "description": "Draws a pill-style button with rounded edges.", "value": { "type": "boolean" } }, { "name": "circle", "description": "Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the\ndefault slot.", "value": { "type": "boolean" } }, { "name": "type", "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.", "value": { "type": "'button' | 'submit' | 'reset'" } }, { "name": "name", "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.", "value": { "type": "string" } }, { "name": "value", "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.", "value": { "type": "string" } }, { "name": "href", "description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.", "value": { "type": "string" } }, { "name": "target", "description": "Tells the browser where to open the link. Only used when `href` is present.", "value": { "type": "'_blank' | '_parent' | '_self' | '_top'" } }, { "name": "rel", "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.", "value": { "type": "string" } }, { "name": "download", "description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.", "value": { "type": "string | undefined" } }, { "name": "form", "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.", "value": { "type": "string" } }, { "name": "formaction", "description": "Used to override the form owner's `action` attribute.", "value": { "type": "string" } }, { "name": "formenctype", "description": "Used to override the form owner's `enctype` attribute.", "value": { "type": "'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'" } }, { "name": "formmethod", "description": "Used to override the form owner's `method` attribute.", "value": { "type": "'post' | 'get'" } }, { "name": "formnovalidate", "description": "Used to override the form owner's `novalidate` attribute.", "value": { "type": "boolean" } }, { "name": "formtarget", "description": "Used to override the form owner's `target` attribute.", "value": { "type": "'_self' | '_blank' | '_parent' | '_top' | string" } } ], "events": [ { "name": "sl-blur", "description": "Emitted when the button loses focus." }, { "name": "sl-focus", "description": "Emitted when the button gains focus." }, { "name": "sl-invalid", "description": "Emitted when the form control has been checked for validity and its constraints aren't satisfied." } ] } }, { "name": "sl-button-group", "description": "Button groups can be used to group related buttons into sections.\n---\n\n\n### **Slots:**\n - _default_ - One or more `<sl-button>` elements to display in the button group.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.", "doc-url": "", "attributes": [ { "name": "label", "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.", "value": { "type": "string", "default": "''" } } ], "slots": [ { "name": "", "description": "One or more `<sl-button>` elements to display in the button group." } ], "events": [], "js": { "properties": [ { "name": "label", "description": "A label to use for the button group. This won't be displayed on the screen, but it will be announced by assistive\ndevices when interacting with the control and is strongly recommended.", "value": { "type": "string" } } ], "events": [] } }, { "name": "sl-card", "description": "Cards can be used to group related subjects in a container.\n---\n\n\n### **Slots:**\n - _default_ - The card's main content.\n- **header** - An optional header for the card.\n- **footer** - An optional footer for the card.\n- **image** - An optional image to render at the start of the card.\n\n### **CSS Properties:**\n - **--border-color** - The card's border color, including borders that occur inside the card. _(default: undefined)_\n- **--border-radius** - The border radius for the card's edges. _(default: undefined)_\n- **--border-width** - The width of the card's borders. _(default: undefined)_\n- **--padding** - The padding to use for the card's sections. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **image** - The container that wraps the card's image.\n- **header** - The container that wraps the card's header.\n- **body** - The container that wraps the card's main content.\n- **footer** - The container that wraps the card's footer.", "doc-url": "", "attributes": [], "slots": [ { "name": "", "description": "The card's main content." }, { "name": "header", "description": "An optional header for the card." }, { "name": "footer", "description": "An optional footer for the card." }, { "name": "image", "description": "An optional image to render at the start of the card." } ], "events": [], "js": { "properties": [{ "name": "hasSlotController", "value": {} }], "events": [] } }, { "name": "sl-carousel", "description": "Carousels display an arbitrary number of content slides along a horizontal or vertical axis.\n---\n\n\n### **Events:**\n - **sl-slide-change** - Emitted when the active slide changes.\n\n### **Methods:**\n - **previous(behavior: _ScrollBehavior_)** - Move the carousel backward by `slides-per-move` slides.\n- **next(behavior: _ScrollBehavior_)** - Move the carousel forward by `slides-per-move` slides.\n- **goToSlide(index: _number_, behavior: _ScrollBehavior_)** - Scrolls the carousel to the slide specified by `index`.\n\n### **Slots:**\n - _default_ - The carousel's main content, one or more `<sl-carousel-item>` elements.\n- **next-icon** - Optional next icon to use instead of the default. Works best with `<sl-icon>`.\n- **previous-icon** - Optional previous icon to use instead of the default. Works best with `<sl-icon>`.\n\n### **CSS Properties:**\n - **--slide-gap** - The space between each slide. _(default: undefined)_\n- **--aspect-ratio** - The aspect ratio of each slide. _(default: 16/9)_\n- **--scroll-hint** - The amount of padding to apply to the scroll area, allowing adjacent slides to become partially visible as a scroll hint. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The carousel's internal wrapper.\n- **scroll-container** - The scroll container that wraps the slides.\n- **pagination** - The pagination indicators wrapper.\n- **pagination-item** - The pagination indicator.\n- **pagination-item--active** - Applied when the item is active.\n- **navigation** - The navigation wrapper.\n- **navigation-button** - The navigation button.\n- **navigation-button--previous** - Applied to the previous button.\n- **navigation-button--next** - Applied to the next button.", "doc-url": "", "attributes": [ { "name": "loop", "description": "When set, allows the user to navigate the carousel in the same direction indefinitely.", "value": { "type": "boolean", "default": "false" } }, { "name": "navigation", "description": "When set, show the carousel's navigation.", "value": { "type": "boolean", "default": "false" } }, { "name": "pagination", "description": "When set, show the carousel's pagination indicators.", "value": { "type": "boolean", "default": "false" } }, { "name": "autoplay", "description": "When set, the slides will scroll automatically when the user is not interacting with them.", "value": { "type": "boolean", "default": "false" } }, { "name": "autoplay-interval", "description": "Specifies the amount of time, in milliseconds, between each automatic scroll.", "value": { "type": "number", "default": "3000" } }, { "name": "slides-per-page", "description": "Specifies how many slides should be shown at a given time.", "value": { "type": "number", "default": "1" } }, { "name": "slides-per-move", "description": "Specifies the number of slides the carousel will advance when scrolling, usefu