2725 lines
150 KiB
JSON
2725 lines
150 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
|
|
"version": 1.1,
|
|
"tags": [
|
|
{
|
|
"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.",
|
|
"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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "closable",
|
|
"description": "Enables a close button that allows the user to dismiss the alert.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "variant",
|
|
"description": "The alert's theme variant.",
|
|
"values": [
|
|
{ "name": "primary" },
|
|
{ "name": "success" },
|
|
{ "name": "neutral" },
|
|
{ "name": "warning" },
|
|
{ "name": "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.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/alert"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-avatar",
|
|
"description": "Avatars are used to represent a person or object.\n---\n\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.",
|
|
"attributes": [
|
|
{
|
|
"name": "image",
|
|
"description": "The image source to use for the avatar.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "A label to use to describe the avatar to assistive devices.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "initials",
|
|
"description": "Initials to use as a fallback when no image is available (1-2 characters max recommended).",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "loading",
|
|
"description": "Indicates how the browser should load the image.",
|
|
"values": [{ "name": "eager" }, { "name": "lazy" }]
|
|
},
|
|
{
|
|
"name": "shape",
|
|
"description": "The shape of the avatar.",
|
|
"values": [
|
|
{ "name": "circle" },
|
|
{ "name": "square" },
|
|
{ "name": "rounded" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/avatar"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [
|
|
{
|
|
"name": "variant",
|
|
"description": "The badge's theme variant.",
|
|
"values": [
|
|
{ "name": "primary" },
|
|
{ "name": "success" },
|
|
{ "name": "neutral" },
|
|
{ "name": "warning" },
|
|
{ "name": "danger" }
|
|
]
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style badge with rounded edges.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pulse",
|
|
"description": "Makes the badge pulsate to draw attention.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/badge"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the built-in animation to use. For custom animations, use the `keyframes` prop.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "delay",
|
|
"description": "The number of milliseconds to delay the start of the animation.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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)",
|
|
"values": [{ "name": "PlaybackDirection" }]
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"description": "The number of milliseconds each iteration of the animation takes to complete.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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)`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "end-delay",
|
|
"description": "The number of milliseconds to delay after the active period of an animation sequence.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "fill",
|
|
"description": "Sets how the animation applies styles to its target before and after its execution.",
|
|
"values": [{ "name": "FillMode" }]
|
|
},
|
|
{
|
|
"name": "iterations",
|
|
"description": "The number of iterations to run before the animation completes. Defaults to `Infinity`, which loops.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "iteration-start",
|
|
"description": "The offset at which to start the animation, usually between 0 (start) and 1 (end).",
|
|
"values": []
|
|
},
|
|
{
|
|
"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.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/animation"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [
|
|
{
|
|
"name": "src",
|
|
"description": "The path to the image to load.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "alt",
|
|
"description": "A description of the image used by assistive devices.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "play",
|
|
"description": "Plays the animation. When this attribute is remove, the animation will pause.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/animated-image"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"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.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/breadcrumb"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "target",
|
|
"description": "Tells the browser where to open the link. Only used when `href` is set.",
|
|
"values": [
|
|
{ "name": "_blank" },
|
|
{ "name": "_parent" },
|
|
{ "name": "_self" },
|
|
{ "name": "_top" }
|
|
]
|
|
},
|
|
{
|
|
"name": "rel",
|
|
"description": "The `rel` attribute to use on the link. Only used when `href` is set.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/breadcrumb-item"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "variant",
|
|
"description": "The button's theme variant.",
|
|
"values": [
|
|
{ "name": "default" },
|
|
{ "name": "primary" },
|
|
{ "name": "success" },
|
|
{ "name": "neutral" },
|
|
{ "name": "warning" },
|
|
{ "name": "danger" },
|
|
{ "name": "text" }
|
|
]
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The button's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "caret",
|
|
"description": "Draws the button with a caret. Used to indicate that the button triggers a dropdown menu or similar behavior.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the button.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "loading",
|
|
"description": "Draws the button in a loading state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "outline",
|
|
"description": "Draws an outlined button.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style button with rounded edges.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "circle",
|
|
"description": "Draws a circular icon button. When this attribute is present, the button expects a single `<sl-icon>` in the\ndefault slot.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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.",
|
|
"values": [
|
|
{ "name": "button" },
|
|
{ "name": "submit" },
|
|
{ "name": "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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "href",
|
|
"description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "target",
|
|
"description": "Tells the browser where to open the link. Only used when `href` is present.",
|
|
"values": [
|
|
{ "name": "_blank" },
|
|
{ "name": "_parent" },
|
|
{ "name": "_self" },
|
|
{ "name": "_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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "download",
|
|
"description": "Tells the browser to download the linked file as this filename. Only used when `href` is present.",
|
|
"values": []
|
|
},
|
|
{
|
|
"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.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "formaction",
|
|
"description": "Used to override the form owner's `action` attribute.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "formenctype",
|
|
"description": "Used to override the form owner's `enctype` attribute.",
|
|
"values": [
|
|
{ "name": "application/x-www-form-urlencoded" },
|
|
{ "name": "multipart/form-data" },
|
|
{ "name": "text/plain" }
|
|
]
|
|
},
|
|
{
|
|
"name": "formmethod",
|
|
"description": "Used to override the form owner's `method` attribute.",
|
|
"values": [{ "name": "post" }, { "name": "get" }]
|
|
},
|
|
{
|
|
"name": "formnovalidate",
|
|
"description": "Used to override the form owner's `novalidate` attribute.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "formtarget",
|
|
"description": "Used to override the form owner's `target` attribute.",
|
|
"values": [
|
|
{ "name": "_self" },
|
|
{ "name": "_blank" },
|
|
{ "name": "_parent" },
|
|
{ "name": "_top" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/button"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"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.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/button-group"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/card"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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.",
|
|
"attributes": [
|
|
{
|
|
"name": "loop",
|
|
"description": "When set, allows the user to navigate the carousel in the same direction indefinitely.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "navigation",
|
|
"description": "When set, show the carousel's navigation.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pagination",
|
|
"description": "When set, show the carousel's pagination indicators.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autoplay",
|
|
"description": "When set, the slides will scroll automatically when the user is not interacting with them.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autoplay-interval",
|
|
"description": "Specifies the amount of time, in milliseconds, between each automatic scroll.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "slides-per-page",
|
|
"description": "Specifies how many slides should be shown at a given time.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "slides-per-move",
|
|
"description": "Specifies the number of slides the carousel will advance when scrolling, useful when specifying a `slides-per-page`\ngreater than one. It can't be higher than `slides-per-page`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "orientation",
|
|
"description": "Specifies the orientation in which the carousel will lay out.",
|
|
"values": [{ "name": "horizontal" }, { "name": "vertical" }]
|
|
},
|
|
{
|
|
"name": "mouse-dragging",
|
|
"description": "When set, it is possible to scroll through the slides by dragging them with the mouse.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/carousel"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-carousel-item",
|
|
"description": "A carousel item represent a slide within a [carousel](/components/carousel).\n---\n\n\n### **Slots:**\n - _default_ - The carousel item's content..\n\n### **CSS Properties:**\n - **--aspect-ratio** - The slide's aspect ratio. Inherited from the carousel by default. _(default: undefined)_",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/carousel-item"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-checkbox",
|
|
"description": "Checkboxes allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the checkbox loses focus.\n- **sl-change** - Emitted when the checked state changes.\n- **sl-focus** - Emitted when the checkbox gains focus.\n- **sl-input** - Emitted when the checkbox receives input.\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 checkbox.\n- **focus(options: _FocusOptions_)** - Sets focus on the checkbox.\n- **blur()** - Removes focus from the checkbox.\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. The value provided will be shown to the user when the form is submitted. To clear\nthe custom validation message, call this method with an empty string.\n\n### **Slots:**\n - _default_ - The checkbox's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The square container that wraps the checkbox's checked state.\n- **control--checked** - Matches the control part when the checkbox is checked.\n- **control--indeterminate** - Matches the control part when the checkbox is indeterminate.\n- **checked-icon** - The checked icon, an `<sl-icon>` element.\n- **indeterminate-icon** - The indeterminate icon, an `<sl-icon>` element.\n- **label** - The container that wraps the checkbox's label.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the checkbox, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the checkbox, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The checkbox's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the checkbox.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "checked",
|
|
"description": "Draws the checkbox in a checked state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "indeterminate",
|
|
"description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Makes the checkbox a required field.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/checkbox"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-color-picker",
|
|
"description": "Color pickers allow the user to select a color.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the color picker loses focus.\n- **sl-change** - Emitted when the color picker's value changes.\n- **sl-focus** - Emitted when the color picker receives focus.\n- **sl-input** - Emitted when the color picker receives input.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the color picker.\n- **blur()** - Removes focus from the color picker.\n- **getFormattedValue(format: _'hex' | 'hexa' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hsv' | 'hsva'_)** - Returns the current value as a string in the specified format.\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 - **label** - The color picker's form label. Alternatively, you can use the `label` attribute.\n\n### **CSS Properties:**\n - **--grid-width** - The width of the color grid. _(default: undefined)_\n- **--grid-height** - The height of the color grid. _(default: undefined)_\n- **--grid-handle-size** - The size of the color grid's handle. _(default: undefined)_\n- **--slider-height** - The height of the hue and alpha sliders. _(default: undefined)_\n- **--slider-handle-size** - The diameter of the slider's handle. _(default: undefined)_\n- **--swatch-size** - The size of each predefined color swatch. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **trigger** - The color picker's dropdown trigger.\n- **swatches** - The container that holds the swatches.\n- **swatch** - Each individual swatch.\n- **grid** - The color grid.\n- **grid-handle** - The color grid's handle.\n- **slider** - Hue and opacity sliders.\n- **slider-handle** - Hue and opacity slider handles.\n- **hue-slider** - The hue slider.\n- **hue-slider-handle** - The hue slider's handle.\n- **opacity-slider** - The opacity slider.\n- **opacity-slider-handle** - The opacity slider's handle.\n- **preview** - The preview color.\n- **input** - The text input.\n- **eye-dropper-button** - The eye dropper button.\n- **eye-dropper-button__base** - The eye dropper button's exported `button` part.\n- **eye-dropper-button__prefix** - The eye dropper button's exported `prefix` part.\n- **eye-dropper-button__label** - The eye dropper button's exported `label` part.\n- **eye-dropper-button__suffix** - The eye dropper button's exported `suffix` part.\n- **eye-dropper-button__caret** - The eye dropper button's exported `caret` part.\n- **format-button** - The format button.\n- **format-button__base** - The format button's exported `button` part.\n- **format-button__prefix** - The format button's exported `prefix` part.\n- **format-button__label** - The format button's exported `label` part.\n- **format-button__suffix** - The format button's exported `suffix` part.\n- **format-button__caret** - The format button's exported `caret` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the color picker. The value's format will vary based the `format` attribute. To get the value\nin a specific format, use the `getFormattedValue()` method. The value is submitted as a name/value pair with form\ndata.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The color picker's label. This will not be displayed, but it will be announced by assistive devices. If you need to\ndisplay HTML, you can use the `label` slot` instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "format",
|
|
"description": "The format to use. If opacity is enabled, these will translate to HEXA, RGBA, HSLA, and HSVA respectively. The color\npicker will accept user input in any format (including CSS color names) and convert it to the desired format.",
|
|
"values": [
|
|
{ "name": "hex" },
|
|
{ "name": "rgb" },
|
|
{ "name": "hsl" },
|
|
{ "name": "hsv" }
|
|
]
|
|
},
|
|
{
|
|
"name": "inline",
|
|
"description": "Renders the color picker inline rather than in a dropdown.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "Determines the size of the color picker's trigger. This has no effect on inline color pickers.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "no-format-toggle",
|
|
"description": "Removes the button that lets users toggle between format.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the form control, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the color picker.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hoist",
|
|
"description": "Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "opacity",
|
|
"description": "Shows the opacity slider. Enabling this will cause the formatted value to be HEXA, RGBA, or HSLA.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "uppercase",
|
|
"description": "By default, values are lowercase. With this attribute, values will be uppercase instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "swatches",
|
|
"description": "One or more predefined color swatches to display as presets in the color picker. Can include any format the color\npicker can parse, including HEX(A), RGB(A), HSL(A), HSV(A), and CSS color names. Each color must be separated by a\nsemicolon (`;`). Alternatively, you can pass an array of color values to this property using JavaScript.",
|
|
"values": [{ "name": "string[]" }]
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Makes the color picker a required field.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/color-picker"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-copy-button",
|
|
"description": "Copies text data to the clipboard when the user clicks the trigger.\n---\n\n\n### **Events:**\n - **sl-copy** - Emitted when the data has been copied.\n- **sl-error** - Emitted when the data could not be copied.\n\n### **Slots:**\n - **copy-icon** - The icon to show in the default copy state. Works best with `<sl-icon>`.\n- **success-icon** - The icon to show when the content is copied. Works best with `<sl-icon>`.\n- **error-icon** - The icon to show when a copy error occurs. Works best with `<sl-icon>`.\n\n### **CSS Properties:**\n - **--success-color** - The color to use for success feedback. _(default: undefined)_\n- **--error-color** - The color to use for error feedback. _(default: undefined)_\n\n### **CSS Parts:**\n - **button** - The internal `<button>` element.\n- **copy-icon** - The container that holds the copy icon.\n- **success-icon** - The container that holds the success icon.\n- **error-icon** - The container that holds the error icon.\n- **tooltip__base** - The tooltip's exported `base` part.\n- **tooltip__base__popup** - The tooltip's exported `popup` part.\n- **tooltip__base__arrow** - The tooltip's exported `arrow` part.\n- **tooltip__body** - The tooltip's exported `body` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The text value to copy.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "from",
|
|
"description": "An id that references an element in the same document from which data will be copied. If both this and `value` are\npresent, this value will take precedence. By default, the target element's `textContent` will be copied. To copy an\nattribute, append the attribute name wrapped in square brackets, e.g. `from=\"el[value]\"`. To copy a property,\nappend a dot and the property name, e.g. `from=\"el.value\"`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the copy button.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "copy-label",
|
|
"description": "A custom label to show in the tooltip.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "success-label",
|
|
"description": "A custom label to show in the tooltip after copying.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "error-label",
|
|
"description": "A custom label to show in the tooltip when a copy error occurs.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "feedback-duration",
|
|
"description": "The length of time to show feedback before restoring the default trigger.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "tooltip-placement",
|
|
"description": "The preferred placement of the tooltip.",
|
|
"values": [
|
|
{ "name": "top" },
|
|
{ "name": "right" },
|
|
{ "name": "bottom" },
|
|
{ "name": "left" }
|
|
]
|
|
},
|
|
{
|
|
"name": "hoist",
|
|
"description": "Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/copy-button"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-details",
|
|
"description": "Details show a brief summary and expand to show additional content.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the details opens.\n- **sl-after-show** - Emitted after the details opens and all animations are complete.\n- **sl-hide** - Emitted when the details closes.\n- **sl-after-hide** - Emitted after the details closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the details.\n- **hide()** - Hides the details\n\n### **Slots:**\n - _default_ - The details' main content.\n- **summary** - The details' summary. Alternatively, you can use the `summary` attribute.\n- **expand-icon** - Optional expand icon to use instead of the default. Works best with `<sl-icon>`.\n- **collapse-icon** - Optional collapse icon to use instead of the default. Works best with `<sl-icon>`.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **header** - The header that wraps both the summary and the expand/collapse icon.\n- **summary** - The container that wraps the summary.\n- **summary-icon** - The container that wraps the expand/collapse icons.\n- **content** - The details content.",
|
|
"attributes": [
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the details is open. You can toggle this attribute to show and hide the details, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the details' open state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "summary",
|
|
"description": "The summary to show in the header. If you need to display HTML, use the `summary` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the details so it can't be toggled.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/details"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-dialog",
|
|
"description": "Dialogs, sometimes called \"modals\", appear above the page and require the user's immediate attention.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the dialog opens.\n- **sl-after-show** - Emitted after the dialog opens and all animations are complete.\n- **sl-hide** - Emitted when the dialog closes.\n- **sl-after-hide** - Emitted after the dialog closes and all animations are complete.\n- **sl-initial-focus** - Emitted when the dialog opens and is ready to receive focus. Calling `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n- **sl-request-close** - Emitted when the user attempts to close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in destructive behavior such as data loss.\n\n### **Methods:**\n - **show()** - Shows the dialog.\n- **hide()** - Hides the dialog\n\n### **Slots:**\n - _default_ - The dialog's main content.\n- **label** - The dialog's label. Alternatively, you can use the `label` attribute.\n- **header-actions** - Optional actions to add to the header. Works best with `<sl-icon-button>`.\n- **footer** - The dialog's footer, usually one or more buttons representing various options.\n\n### **CSS Properties:**\n - **--width** - The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens. _(default: undefined)_\n- **--header-spacing** - The amount of padding to use for the header. _(default: undefined)_\n- **--body-spacing** - The amount of padding to use for the body. _(default: undefined)_\n- **--footer-spacing** - The amount of padding to use for the footer. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **overlay** - The overlay that covers the screen behind the dialog.\n- **panel** - The dialog's panel (where the dialog and its content are rendered).\n- **header** - The dialog's header. This element wraps the title and header actions.\n- **header-actions** - Optional actions to add to the header. Works best with `<sl-icon-button>`.\n- **title** - The dialog's title.\n- **close-button** - The close button, an `<sl-icon-button>`.\n- **close-button__base** - The close button's exported `base` part.\n- **body** - The dialog's body.\n- **footer** - The dialog's footer.",
|
|
"attributes": [
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The dialog's label as displayed in the header. You should always include a relevant label even when using\n`no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "no-header",
|
|
"description": "Disables the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the dialog.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/dialog"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-divider",
|
|
"description": "Dividers are used to visually separate or group elements.\n---\n\n\n### **CSS Properties:**\n - **--color** - The color of the divider. _(default: undefined)_\n- **--width** - The width of the divider. _(default: undefined)_\n- **--spacing** - The spacing of the divider. _(default: undefined)_",
|
|
"attributes": [
|
|
{
|
|
"name": "vertical",
|
|
"description": "Draws the divider in a vertical orientation.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/divider"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-drawer",
|
|
"description": "Drawers slide in from a container to expose additional options and information.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the drawer opens.\n- **sl-after-show** - Emitted after the drawer opens and all animations are complete.\n- **sl-hide** - Emitted when the drawer closes.\n- **sl-after-hide** - Emitted after the drawer closes and all animations are complete.\n- **sl-initial-focus** - Emitted when the drawer opens and is ready to receive focus. Calling `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n- **sl-request-close** - Emitted when the user attempts to close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in destructive behavior such as data loss.\n\n### **Methods:**\n - **show()** - Shows the drawer.\n- **hide()** - Hides the drawer\n\n### **Slots:**\n - _default_ - The drawer's main content.\n- **label** - The drawer's label. Alternatively, you can use the `label` attribute.\n- **header-actions** - Optional actions to add to the header. Works best with `<sl-icon-button>`.\n- **footer** - The drawer's footer, usually one or more buttons representing various options.\n\n### **CSS Properties:**\n - **--size** - The preferred size of the drawer. This will be applied to the drawer's width or height depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens. _(default: undefined)_\n- **--header-spacing** - The amount of padding to use for the header. _(default: undefined)_\n- **--body-spacing** - The amount of padding to use for the body. _(default: undefined)_\n- **--footer-spacing** - The amount of padding to use for the footer. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **overlay** - The overlay that covers the screen behind the drawer.\n- **panel** - The drawer's panel (where the drawer and its content are rendered).\n- **header** - The drawer's header. This element wraps the title and header actions.\n- **header-actions** - Optional actions to add to the header. Works best with `<sl-icon-button>`.\n- **title** - The drawer's title.\n- **close-button** - The close button, an `<sl-icon-button>`.\n- **close-button__base** - The close button's exported `base` part.\n- **body** - The drawer's body.\n- **footer** - The drawer's footer.",
|
|
"attributes": [
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The drawer's label as displayed in the header. You should always include a relevant label even when using\n`no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placement",
|
|
"description": "The direction from which the drawer will open.",
|
|
"values": [
|
|
{ "name": "top" },
|
|
{ "name": "end" },
|
|
{ "name": "bottom" },
|
|
{ "name": "start" }
|
|
]
|
|
},
|
|
{
|
|
"name": "contained",
|
|
"description": "By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\nits parent element, set this attribute and add `position: relative` to the parent.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "no-header",
|
|
"description": "Removes the header. This will also remove the default close button, so please ensure you provide an easy,\naccessible way for users to dismiss the drawer.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/drawer"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-dropdown",
|
|
"description": "Dropdowns expose additional content that \"drops down\" in a panel.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the dropdown opens.\n- **sl-after-show** - Emitted after the dropdown opens and all animations are complete.\n- **sl-hide** - Emitted when the dropdown closes.\n- **sl-after-hide** - Emitted after the dropdown closes and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the dropdown panel.\n- **hide()** - Hides the dropdown panel\n- **reposition()** - Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\nis activated.\n\n### **Slots:**\n - _default_ - The dropdown's main content.\n- **trigger** - The dropdown's trigger, usually a `<sl-button>` element.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **trigger** - The container that wraps the trigger.\n- **panel** - The panel that gets shown when the dropdown is open.",
|
|
"attributes": [
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placement",
|
|
"description": "The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\ninside of the viewport.",
|
|
"values": [
|
|
{ "name": "" },
|
|
{ "name": "top" },
|
|
{ "name": "top-start" },
|
|
{ "name": "top-end" },
|
|
{ "name": "bottom" },
|
|
{ "name": "bottom-start" },
|
|
{ "name": "bottom-end" },
|
|
{ "name": "right" },
|
|
{ "name": "right-start" },
|
|
{ "name": "right-end" },
|
|
{ "name": "left" },
|
|
{ "name": "left-start" },
|
|
{ "name": "left-end" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the dropdown so the panel will not open.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "stay-open-on-select",
|
|
"description": "By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\ndropdowns that allow for multiple interactions.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "distance",
|
|
"description": "The distance in pixels from which to offset the panel away from its trigger.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "skidding",
|
|
"description": "The distance in pixels from which to offset the panel along its trigger.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hoist",
|
|
"description": "Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/dropdown"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-format-bytes",
|
|
"description": "Formats a number as a human readable bytes value.\n---\n",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The number to format in bytes.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "unit",
|
|
"description": "The type of unit to display.",
|
|
"values": [{ "name": "byte" }, { "name": "bit" }]
|
|
},
|
|
{
|
|
"name": "display",
|
|
"description": "Determines how to display the result, e.g. \"100 bytes\", \"100 b\", or \"100b\".",
|
|
"values": [
|
|
{ "name": "long" },
|
|
{ "name": "short" },
|
|
{ "name": "narrow" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/format-bytes"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-format-date",
|
|
"description": "Formats a date/time using the specified locale and options.\n---\n",
|
|
"attributes": [
|
|
{
|
|
"name": "date",
|
|
"description": "The date/time to format. If not set, the current date and time will be used. When passing a string, it's strongly\nrecommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert a date to this format\nin JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).",
|
|
"values": [{ "name": "Date" }]
|
|
},
|
|
{
|
|
"name": "weekday",
|
|
"description": "The format for displaying the weekday.",
|
|
"values": [
|
|
{ "name": "narrow" },
|
|
{ "name": "short" },
|
|
{ "name": "long" }
|
|
]
|
|
},
|
|
{
|
|
"name": "era",
|
|
"description": "The format for displaying the era.",
|
|
"values": [
|
|
{ "name": "narrow" },
|
|
{ "name": "short" },
|
|
{ "name": "long" }
|
|
]
|
|
},
|
|
{
|
|
"name": "year",
|
|
"description": "The format for displaying the year.",
|
|
"values": [{ "name": "numeric" }, { "name": "2-digit" }]
|
|
},
|
|
{
|
|
"name": "month",
|
|
"description": "The format for displaying the month.",
|
|
"values": [
|
|
{ "name": "numeric" },
|
|
{ "name": "2-digit" },
|
|
{ "name": "narrow" },
|
|
{ "name": "short" },
|
|
{ "name": "long" }
|
|
]
|
|
},
|
|
{
|
|
"name": "day",
|
|
"description": "The format for displaying the day.",
|
|
"values": [{ "name": "numeric" }, { "name": "2-digit" }]
|
|
},
|
|
{
|
|
"name": "hour",
|
|
"description": "The format for displaying the hour.",
|
|
"values": [{ "name": "numeric" }, { "name": "2-digit" }]
|
|
},
|
|
{
|
|
"name": "minute",
|
|
"description": "The format for displaying the minute.",
|
|
"values": [{ "name": "numeric" }, { "name": "2-digit" }]
|
|
},
|
|
{
|
|
"name": "second",
|
|
"description": "The format for displaying the second.",
|
|
"values": [{ "name": "numeric" }, { "name": "2-digit" }]
|
|
},
|
|
{
|
|
"name": "time-zone-name",
|
|
"description": "The format for displaying the time.",
|
|
"values": [{ "name": "short" }, { "name": "long" }]
|
|
},
|
|
{
|
|
"name": "time-zone",
|
|
"description": "The time zone to express the time in.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hour-format",
|
|
"description": "The format for displaying the hour.",
|
|
"values": [{ "name": "auto" }, { "name": "12" }, { "name": "24" }]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/format-date"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-format-number",
|
|
"description": "Formats a number using the specified locale and options.\n---\n",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The number to format.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "type",
|
|
"description": "The formatting style to use.",
|
|
"values": [
|
|
{ "name": "currency" },
|
|
{ "name": "decimal" },
|
|
{ "name": "percent" }
|
|
]
|
|
},
|
|
{
|
|
"name": "no-grouping",
|
|
"description": "Turns off grouping separators.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"description": "The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code to use when formatting.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "currency-display",
|
|
"description": "How to display the currency.",
|
|
"values": [
|
|
{ "name": "symbol" },
|
|
{ "name": "narrowSymbol" },
|
|
{ "name": "code" },
|
|
{ "name": "name" }
|
|
]
|
|
},
|
|
{
|
|
"name": "minimum-integer-digits",
|
|
"description": "The minimum number of integer digits to use. Possible values are 1-21.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "minimum-fraction-digits",
|
|
"description": "The minimum number of fraction digits to use. Possible values are 0-20.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "maximum-fraction-digits",
|
|
"description": "The maximum number of fraction digits to use. Possible values are 0-0.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "minimum-significant-digits",
|
|
"description": "The minimum number of significant digits to use. Possible values are 1-21.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "maximum-significant-digits",
|
|
"description": "The maximum number of significant digits to use,. Possible values are 1-21.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/format-number"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-icon",
|
|
"description": "Icons are symbols that can be used to represent various options within an application.\n---\n\n\n### **Events:**\n - **sl-load** - Emitted when the icon has loaded. When using `spriteSheet: true` this will not emit.\n- **sl-error** - Emitted when the icon fails to load due to an error. When using `spriteSheet: true` this will not emit.\n\n### **CSS Parts:**\n - **svg** - The internal SVG element.\n- **use** - The <use> element generated when using `spriteSheet: true`",
|
|
"attributes": [
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the icon to draw. Available names depend on the icon library being used.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "src",
|
|
"description": "An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\nignored by assistive devices.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "library",
|
|
"description": "The name of a registered custom icon library.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/icon"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-icon-button",
|
|
"description": "Icons buttons are simple, icon-only buttons that can be used for actions and in toolbars.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the icon button loses focus.\n- **sl-focus** - Emitted when the icon button gains focus.\n\n### **Methods:**\n - **click()** - Simulates a click on the icon button.\n- **focus(options: _FocusOptions_)** - Sets focus on the icon button.\n- **blur()** - Removes focus from the icon button.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the icon to draw. Available names depend on the icon library being used.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "library",
|
|
"description": "The name of a registered custom icon library.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "src",
|
|
"description": "An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "href",
|
|
"description": "When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "target",
|
|
"description": "Tells the browser where to open the link. Only used when `href` is set.",
|
|
"values": [
|
|
{ "name": "_blank" },
|
|
{ "name": "_parent" },
|
|
{ "name": "_self" },
|
|
{ "name": "_top" }
|
|
]
|
|
},
|
|
{
|
|
"name": "download",
|
|
"description": "Tells the browser to download the linked file as this filename. Only used when `href` is set.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "A description that gets read by assistive devices. For optimal accessibility, you should always include a label\nthat describes what the icon button does.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the button.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/icon-button"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-image-comparer",
|
|
"description": "Compare visual differences between similar photos with a sliding panel.\n---\n\n\n### **Events:**\n - **sl-change** - Emitted when the position changes.\n\n### **Slots:**\n - **before** - The before image, an `<img>` or `<svg>` element.\n- **after** - The after image, an `<img>` or `<svg>` element.\n- **handle** - The icon used inside the handle.\n\n### **CSS Properties:**\n - **--divider-width** - The width of the dividing line. _(default: undefined)_\n- **--handle-size** - The size of the compare handle. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **before** - The container that wraps the before image.\n- **after** - The container that wraps the after image.\n- **divider** - The divider that separates the images.\n- **handle** - The handle that the user drags to expose the after image.",
|
|
"attributes": [
|
|
{
|
|
"name": "position",
|
|
"description": "The position of the divider as a percentage.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/image-comparer"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-include",
|
|
"description": "Includes give you the power to embed external HTML files into the page.\n---\n\n\n### **Events:**\n - **sl-load** - Emitted when the included file is loaded.\n- **sl-error** - Emitted when the included file fails to load due to an error.",
|
|
"attributes": [
|
|
{
|
|
"name": "src",
|
|
"description": "The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "mode",
|
|
"description": "The fetch mode to use.",
|
|
"values": [
|
|
{ "name": "cors" },
|
|
{ "name": "no-cors" },
|
|
{ "name": "same-origin" }
|
|
]
|
|
},
|
|
{
|
|
"name": "allow-scripts",
|
|
"description": "Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/include"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-input",
|
|
"description": "Inputs collect data from the user.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the control loses focus.\n- **sl-change** - Emitted when an alteration to the control's value is committed by the user.\n- **sl-clear** - Emitted when the clear button is activated.\n- **sl-focus** - Emitted when the control gains focus.\n- **sl-input** - Emitted when the control receives input.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the input.\n- **blur()** - Removes focus from the input.\n- **select()** - Selects all the text in the input.\n- **setSelectionRange(selectionStart: _number_, selectionEnd: _number_, selectionDirection: _'forward' | 'backward' | 'none'_)** - Sets the start and end positions of the text selection (0-based).\n- **setRangeText(replacement: _string_, start: _number_, end: _number_, selectMode: _'select' | 'start' | 'end' | 'preserve'_)** - Replaces a range of text with a new string.\n- **showPicker()** - Displays the browser picker for an input element (only works if the browser supports it for the input type).\n- **stepUp()** - Increments the value of a numeric input type by the value of the step attribute.\n- **stepDown()** - Decrements the value of a numeric input type by the value of the step attribute.\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 - **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **prefix** - Used to prepend a presentational icon or similar element to the input.\n- **suffix** - Used to append a presentational icon or similar element to the input.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n- **show-password-icon** - An icon to use in lieu of the default show password icon.\n- **hide-password-icon** - An icon to use in lieu of the default hide password icon.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The input's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **input** - The internal `<input>` control.\n- **prefix** - The container that wraps the prefix.\n- **clear-button** - The clear button.\n- **password-toggle-button** - The password toggle button.\n- **suffix** - The container that wraps the suffix.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "type",
|
|
"description": "The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\nto `text`.",
|
|
"values": [
|
|
{ "name": "" },
|
|
{ "name": "date" },
|
|
{ "name": "datetime-local" },
|
|
{ "name": "email" },
|
|
{ "name": "number" },
|
|
{ "name": "password" },
|
|
{ "name": "search" },
|
|
{ "name": "tel" },
|
|
{ "name": "text" },
|
|
{ "name": "time" },
|
|
{ "name": "url" }
|
|
]
|
|
},
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the input, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the input, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The input's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "filled",
|
|
"description": "Draws a filled input.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style input with rounded edges.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The input's label. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "help-text",
|
|
"description": "The input's help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "clearable",
|
|
"description": "Adds a clear button when the input is not empty.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the input.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placeholder",
|
|
"description": "Placeholder text to show as a hint when the input is empty.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "readonly",
|
|
"description": "Makes the input readonly.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "password-toggle",
|
|
"description": "Adds a button to toggle the password's visibility. Only applies to password types.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "password-visible",
|
|
"description": "Determines whether or not the password is currently visible. Only applies to password input types.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "no-spin-buttons",
|
|
"description": "Hides the browser's built-in increment/decrement spin buttons for number inputs.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Makes the input a required field.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pattern",
|
|
"description": "A regular expression pattern to validate input against.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "minlength",
|
|
"description": "The minimum length of input that will be considered valid.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "maxlength",
|
|
"description": "The maximum length of input that will be considered valid.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "min",
|
|
"description": "The input's minimum value. Only applies to date and number input types.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "max",
|
|
"description": "The input's maximum value. Only applies to date and number input types.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "step",
|
|
"description": "Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\nimplied, allowing any numeric value. Only applies to date and number input types.",
|
|
"values": [{ "name": "any" }]
|
|
},
|
|
{
|
|
"name": "autocapitalize",
|
|
"description": "Controls whether and how text input is automatically capitalized as it is entered by the user.",
|
|
"values": [
|
|
{ "name": "off" },
|
|
{ "name": "none" },
|
|
{ "name": "on" },
|
|
{ "name": "sentences" },
|
|
{ "name": "words" },
|
|
{ "name": "characters" }
|
|
]
|
|
},
|
|
{
|
|
"name": "autocorrect",
|
|
"description": "Indicates whether the browser's autocorrect feature is on or off.",
|
|
"values": [{ "name": "off" }, { "name": "on" }]
|
|
},
|
|
{
|
|
"name": "autocomplete",
|
|
"description": "Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n[this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autofocus",
|
|
"description": "Indicates that the input should receive focus on page load.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "enterkeyhint",
|
|
"description": "Used to customize the label or icon of the Enter key on virtual keyboards.",
|
|
"values": [
|
|
{ "name": "enter" },
|
|
{ "name": "done" },
|
|
{ "name": "go" },
|
|
{ "name": "next" },
|
|
{ "name": "previous" },
|
|
{ "name": "search" },
|
|
{ "name": "send" }
|
|
]
|
|
},
|
|
{
|
|
"name": "spellcheck",
|
|
"description": "Enables spell checking on the input.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "inputmode",
|
|
"description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
|
|
"values": [
|
|
{ "name": "none" },
|
|
{ "name": "text" },
|
|
{ "name": "decimal" },
|
|
{ "name": "numeric" },
|
|
{ "name": "tel" },
|
|
{ "name": "search" },
|
|
{ "name": "email" },
|
|
{ "name": "url" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/input"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-menu",
|
|
"description": "Menus provide a list of options for the user to choose from.\n---\n\n\n### **Events:**\n - **sl-select** - Emitted when a menu item is selected.\n\n### **Slots:**\n - _default_ - The menu's content, including menu items, menu labels, and dividers.",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/menu"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-menu-label",
|
|
"description": "Menu labels are used to describe a group of menu items.\n---\n\n\n### **Slots:**\n - _default_ - The menu label's content.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/menu-label"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-option",
|
|
"description": "Options define the selectable items within various form controls such as [select](/components/select).\n---\n\n\n### **Methods:**\n - **getTextLabel()** - Returns a plain text label based on the option's content.\n\n### **Slots:**\n - _default_ - The option's label.\n- **prefix** - Used to prepend an icon or similar element to the menu item.\n- **suffix** - Used to append an icon or similar element to the menu item.\n\n### **CSS Parts:**\n - **checked-icon** - The checked icon, an `<sl-icon>` element.\n- **base** - The component's base wrapper.\n- **label** - The option's label.\n- **prefix** - The container that wraps the prefix.\n- **suffix** - The container that wraps the suffix.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The option's value. When selected, the containing form control will receive this value. The value must be unique\nfrom other options in the same group. Values may not contain spaces, as spaces are used as delimiters when listing\nmultiple values.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Draws the option in a disabled state, preventing selection.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/option"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-menu-item",
|
|
"description": "Menu items provide options for the user to pick from in a menu.\n---\n\n\n### **Methods:**\n - **getTextLabel()** - Returns a text label based on the contents of the menu item's default slot.\n\n### **Slots:**\n - _default_ - The menu item's label.\n- **prefix** - Used to prepend an icon or similar element to the menu item.\n- **suffix** - Used to append an icon or similar element to the menu item.\n- **submenu** - Used to denote a nested menu.\n\n### **CSS Properties:**\n - **--submenu-offset** - The distance submenus shift to overlap the parent menu. _(default: -2px)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **checked-icon** - The checked icon, which is only visible when the menu item is checked.\n- **prefix** - The prefix container.\n- **label** - The menu item label.\n- **suffix** - The suffix container.\n- **spinner** - The spinner that shows when the menu item is in the loading state.\n- **spinner__base** - The spinner's base part.\n- **submenu-icon** - The submenu icon, visible only when the menu item has a submenu (not yet implemented).",
|
|
"attributes": [
|
|
{
|
|
"name": "type",
|
|
"description": "The type of menu item to render. To use `checked`, this value must be set to `checkbox`.",
|
|
"values": [{ "name": "normal" }, { "name": "checkbox" }]
|
|
},
|
|
{
|
|
"name": "checked",
|
|
"description": "Draws the item in a checked state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "A unique value to store in the menu item. This can be used as a way to identify menu items when selected.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "loading",
|
|
"description": "Draws the menu item in a loading state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Draws the menu item in a disabled state, preventing selection.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/menu-item"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-mutation-observer",
|
|
"description": "The Mutation Observer component offers a thin, declarative interface to the [`MutationObserver API`](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver).\n---\n\n\n### **Events:**\n - **sl-mutation** - Emitted when a mutation occurs.\n\n### **Slots:**\n - _default_ - The content to watch for mutations.",
|
|
"attributes": [
|
|
{
|
|
"name": "attr",
|
|
"description": "Watches for changes to attributes. To watch only specific attributes, separate them by a space, e.g.\n`attr=\"class id title\"`. To watch all attributes, use `*`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "attr-old-value",
|
|
"description": "Indicates whether or not the attribute's previous value should be recorded when monitoring changes.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "char-data",
|
|
"description": "Watches for changes to the character data contained within the node.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "char-data-old-value",
|
|
"description": "Indicates whether or not the previous value of the node's text should be recorded.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "child-list",
|
|
"description": "Watches for the addition or removal of new child nodes.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the observer.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/mutation-observer"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-popup",
|
|
"description": "Popup is a utility that lets you declaratively anchor \"popup\" containers to another element.\n---\n\n\n### **Events:**\n - **sl-reposition** - Emitted when the popup is repositioned. This event can fire a lot, so avoid putting expensive operations in your listener or consider debouncing it.\n\n### **Methods:**\n - **reposition()** - Forces the popup to recalculate and reposition itself.\n\n### **Slots:**\n - _default_ - The popup's content.\n- **anchor** - The element the popup will be anchored to. If the anchor lives outside of the popup, you can use the `anchor` attribute or property instead.\n\n### **CSS Properties:**\n - **--arrow-size** - The size of the arrow. Note that an arrow won't be shown unless the `arrow` attribute is used. _(default: 6px)_\n- **--arrow-color** - The color of the arrow. _(default: var(--sl-color-neutral-0))_\n- **--auto-size-available-width** - A read-only custom property that determines the amount of width the popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only available when using `auto-size`. _(default: undefined)_\n- **--auto-size-available-height** - A read-only custom property that determines the amount of height the popup can be before overflowing. Useful for positioning child elements that need to overflow. This property is only available when using `auto-size`. _(default: undefined)_\n\n### **CSS Parts:**\n - **arrow** - The arrow's container. Avoid setting `top|bottom|left|right` properties, as these values are assigned dynamically as the popup moves. This is most useful for applying a background color to match the popup, and maybe a border or box shadow.\n- **popup** - The popup's container. Useful for setting a background color, box shadow, etc.\n- **hover-bridge** - The hover bridge element. Only available when the `hover-bridge` option is enabled.",
|
|
"attributes": [
|
|
{
|
|
"name": "anchor",
|
|
"description": "The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide the anchor\nelement `id`, a DOM element reference, or a `VirtualElement`. If the anchor lives inside the popup, use the\n`anchor` slot instead.",
|
|
"values": [{ "name": "Element" }, { "name": "VirtualElement" }]
|
|
},
|
|
{
|
|
"name": "active",
|
|
"description": "Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\ndown and the popup will be hidden.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placement",
|
|
"description": "The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\npanel inside of the viewport.",
|
|
"values": [
|
|
{ "name": "" },
|
|
{ "name": "top" },
|
|
{ "name": "top-start" },
|
|
{ "name": "top-end" },
|
|
{ "name": "bottom" },
|
|
{ "name": "bottom-start" },
|
|
{ "name": "bottom-end" },
|
|
{ "name": "right" },
|
|
{ "name": "right-start" },
|
|
{ "name": "right-end" },
|
|
{ "name": "left" },
|
|
{ "name": "left-start" },
|
|
{ "name": "left-end" }
|
|
]
|
|
},
|
|
{
|
|
"name": "strategy",
|
|
"description": "Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\nclipped, using a `fixed` position strategy can often workaround it.",
|
|
"values": [{ "name": "absolute" }, { "name": "fixed" }]
|
|
},
|
|
{
|
|
"name": "distance",
|
|
"description": "The distance in pixels from which to offset the panel away from its anchor.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "skidding",
|
|
"description": "The distance in pixels from which to offset the panel along its anchor.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "arrow",
|
|
"description": "Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n`--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n`::part(arrow)` in your stylesheet.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "arrow-placement",
|
|
"description": "The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\nanchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\nalign the arrow to the start, end, or center of the popover instead.",
|
|
"values": [
|
|
{ "name": "start" },
|
|
{ "name": "end" },
|
|
{ "name": "center" },
|
|
{ "name": "anchor" }
|
|
]
|
|
},
|
|
{
|
|
"name": "arrow-padding",
|
|
"description": "The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\nthis will prevent it from overflowing the corners.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "flip",
|
|
"description": "When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n`flipFallbackPlacements` to further configure how the fallback placement is determined.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "flip-fallback-placements",
|
|
"description": "If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\nstring of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\nfallback strategy will be used instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "flip-fallback-strategy",
|
|
"description": "When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\nthe popup should be positioned using the best available fit based on available space or as it was initially\npreferred.",
|
|
"values": [{ "name": "best-fit" }, { "name": "initial" }]
|
|
},
|
|
{
|
|
"name": "flipBoundary",
|
|
"description": "The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.",
|
|
"values": [{ "name": "Element" }, { "name": "Element[]" }]
|
|
},
|
|
{
|
|
"name": "flip-padding",
|
|
"description": "The amount of padding, in pixels, to exceed before the flip behavior will occur.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "shift",
|
|
"description": "Moves the popup along the axis to keep it in view when clipped.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "shiftBoundary",
|
|
"description": "The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.",
|
|
"values": [{ "name": "Element" }, { "name": "Element[]" }]
|
|
},
|
|
{
|
|
"name": "shift-padding",
|
|
"description": "The amount of padding, in pixels, to exceed before the shift behavior will occur.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "auto-size",
|
|
"description": "When set, this will cause the popup to automatically resize itself to prevent it from overflowing.",
|
|
"values": [
|
|
{ "name": "horizontal" },
|
|
{ "name": "vertical" },
|
|
{ "name": "both" }
|
|
]
|
|
},
|
|
{
|
|
"name": "sync",
|
|
"description": "Syncs the popup's width or height to that of the anchor element.",
|
|
"values": [
|
|
{ "name": "width" },
|
|
{ "name": "height" },
|
|
{ "name": "both" }
|
|
]
|
|
},
|
|
{
|
|
"name": "autoSizeBoundary",
|
|
"description": "The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\ndefault, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\nchange the boundary by passing a reference to one or more elements to this property.",
|
|
"values": [{ "name": "Element" }, { "name": "Element[]" }]
|
|
},
|
|
{
|
|
"name": "auto-size-padding",
|
|
"description": "The amount of padding, in pixels, to exceed before the auto-size behavior will occur.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hover-bridge",
|
|
"description": "When a gap exists between the anchor and the popup element, this option will add a \"hover bridge\" that fills the\ngap using an invisible element. This makes listening for events such as `mouseenter` and `mouseleave` more sane\nbecause the pointer never technically leaves the element. The hover bridge will only be drawn when the popover is\nactive.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/popup"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-progress-bar",
|
|
"description": "Progress bars are used to show the status of an ongoing operation.\n---\n\n\n### **Slots:**\n - _default_ - A label to show inside the progress indicator.\n\n### **CSS Properties:**\n - **--height** - The progress bar's height. _(default: undefined)_\n- **--track-color** - The color of the track. _(default: undefined)_\n- **--indicator-color** - The color of the indicator. _(default: undefined)_\n- **--label-color** - The color of the label. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **indicator** - The progress bar's indicator.\n- **label** - The progress bar's label.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The current progress as a percentage, 0 to 100.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "indeterminate",
|
|
"description": "When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "A custom label for assistive devices.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/progress-bar"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-progress-ring",
|
|
"description": "Progress rings are used to show the progress of a determinate operation in a circular fashion.\n---\n\n\n### **Slots:**\n - _default_ - A label to show inside the ring.\n\n### **CSS Properties:**\n - **--size** - The diameter of the progress ring (cannot be a percentage). _(default: undefined)_\n- **--track-width** - The width of the track. _(default: undefined)_\n- **--track-color** - The color of the track. _(default: undefined)_\n- **--indicator-width** - The width of the indicator. Defaults to the track width. _(default: undefined)_\n- **--indicator-color** - The color of the indicator. _(default: undefined)_\n- **--indicator-transition-duration** - The duration of the indicator's transition when the value changes. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **label** - The progress ring label.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The current progress as a percentage, 0 to 100.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "A custom label for assistive devices.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/progress-ring"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-qr-code",
|
|
"description": "Generates a [QR code](https://www.qrcode.com/) and renders it using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API).\n---\n\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The QR code's value.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The label for assistive devices to announce. If unspecified, the value will be used instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The size of the QR code, in pixels.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "fill",
|
|
"description": "The fill color. This can be any valid CSS color, but not a CSS custom property.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "background",
|
|
"description": "The background color. This can be any valid CSS color or `transparent`. It cannot be a CSS custom property.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "radius",
|
|
"description": "The edge radius of each module. Must be between 0 and 0.5.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "error-correction",
|
|
"description": "The level of error correction to use. [Learn more](https://www.qrcode.com/en/about/error_correction.html)",
|
|
"values": [
|
|
{ "name": "L" },
|
|
{ "name": "M" },
|
|
{ "name": "Q" },
|
|
{ "name": "H" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/qr-code"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-radio",
|
|
"description": "Radios allow the user to select a single option from a group.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the control loses focus.\n- **sl-focus** - Emitted when the control gains focus.\n\n### **Slots:**\n - _default_ - The radio's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The circular container that wraps the radio's checked state.\n- **control--checked** - The radio control when the radio is checked.\n- **checked-icon** - The checked icon, an `<sl-icon>` element.\n- **label** - The container that wraps the radio's label.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The radio's value. When selected, the radio group will receive this value.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The radio's size. When used inside a radio group, the size will be determined by the radio group's size so this\nattribute can typically be omitted.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the radio.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/radio"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-radio-button",
|
|
"description": "Radios buttons allow the user to select a single option from a group using a button-like control.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the button loses focus.\n- **sl-focus** - Emitted when the button gains focus.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the radio button.\n- **blur()** - Removes focus from the radio button.\n\n### **Slots:**\n - _default_ - The radio 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- **button** - The internal `<button>` element.\n- **button--checked** - The internal button element when the radio button is checked.\n- **prefix** - The container that wraps the prefix.\n- **label** - The container that wraps the radio button's label.\n- **suffix** - The container that wraps the suffix.",
|
|
"attributes": [
|
|
{
|
|
"name": "value",
|
|
"description": "The radio's value. When selected, the radio group will receive this value.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the radio button.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so\nthis attribute can typically be omitted.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style radio button with rounded edges.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/radio-button"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-radio-group",
|
|
"description": "Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n---\n\n\n### **Events:**\n - **sl-change** - Emitted when the radio group's selected value changes.\n- **sl-input** - Emitted when the radio group receives user input.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\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(): _boolean_** - Checks for validity and shows the browser's validation message if the control is invalid.\n- **setCustomValidity(message)** - Sets a custom validation message. Pass an empty string to restore validity.\n\n### **Slots:**\n - _default_ - The default slot where `<sl-radio>` or `<sl-radio-button>` elements are placed.\n- **label** - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label` attribute.\n- **help-text** - Text that describes how to use the radio group. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The input's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **button-group** - The button group that wraps radio buttons.\n- **button-group__base** - The button group's `base` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "label",
|
|
"description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "help-text",
|
|
"description": "The radio groups's help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the radio group, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the radio group, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The radio group's size. This size will be applied to all child radios and radio buttons.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Ensures a child radio is checked before allowing the containing form to submit.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/radio-group"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-range",
|
|
"description": "Ranges allow the user to select a single value within a given range using a slider.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the control loses focus.\n- **sl-change** - Emitted when an alteration to the control's value is committed by the user.\n- **sl-focus** - Emitted when the control gains focus.\n- **sl-input** - Emitted when the control receives input.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the range.\n- **blur()** - Removes focus from the range.\n- **stepUp()** - Increments the value of the range by the value of the step attribute.\n- **stepDown()** - Decrements the value of the range by the value of the step attribute.\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 - **label** - The range's label. Alternatively, you can use the `label` attribute.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Properties:**\n - **--thumb-size** - The size of the thumb. _(default: undefined)_\n- **--tooltip-offset** - The vertical distance the tooltip is offset from the track. _(default: undefined)_\n- **--track-color-active** - The color of the portion of the track that represents the current value. _(default: undefined)_\n- **--track-color-inactive** - The of the portion of the track that represents the remaining value. _(default: undefined)_\n- **--track-height** - The height of the track. _(default: undefined)_\n- **--track-active-offset** - The point of origin of the active track. _(default: undefined)_\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The range's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **input** - The internal `<input>` element.\n- **tooltip** - The range's tooltip.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the range, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the range, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The range's label. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "help-text",
|
|
"description": "The range's help text. If you need to display HTML, use the help-text slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the range.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "min",
|
|
"description": "The minimum acceptable value of the range.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "max",
|
|
"description": "The maximum acceptable value of the range.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "step",
|
|
"description": "The interval at which the range will increase and decrease.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "tooltip",
|
|
"description": "The preferred placement of the range's tooltip.",
|
|
"values": [
|
|
{ "name": "top" },
|
|
{ "name": "bottom" },
|
|
{ "name": "none" }
|
|
]
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/range"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-rating",
|
|
"description": "Ratings give users a way to quickly view and provide feedback.\n---\n\n\n### **Events:**\n - **sl-change** - Emitted when the rating's value changes.\n- **sl-hover** - Emitted when the user hovers over a value. The `phase` property indicates when hovering starts, moves to a new value, or ends. The `value` property tells what the rating's value would be if the user were to commit to the hovered value.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the rating.\n- **blur()** - Removes focus from the rating.\n\n### **CSS Properties:**\n - **--symbol-color** - The inactive color for symbols. _(default: undefined)_\n- **--symbol-color-active** - The active color for symbols. _(default: undefined)_\n- **--symbol-size** - The size of symbols. _(default: undefined)_\n- **--symbol-spacing** - The spacing to use around symbols. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [
|
|
{
|
|
"name": "label",
|
|
"description": "A label that describes the rating to assistive devices.",
|
|
"values": []
|
|
},
|
|
{ "name": "value", "description": "The current rating.", "values": [] },
|
|
{
|
|
"name": "max",
|
|
"description": "The highest rating to show.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "precision",
|
|
"description": "The precision at which the rating will increase and decrease. For example, to allow half-star ratings, set this\nattribute to `0.5`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "readonly",
|
|
"description": "Makes the rating readonly.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the rating.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "getSymbol",
|
|
"description": "A function that customizes the symbol to be rendered. The first and only argument is the rating's current value.\nThe function should return a string containing trusted HTML of the symbol to render at the specified value. Works\nwell with `<sl-icon>` elements.",
|
|
"values": [{ "name": "(value: number) => string" }]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/rating"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-relative-time",
|
|
"description": "Outputs a localized time phrase relative to the current date and time.\n---\n",
|
|
"attributes": [
|
|
{
|
|
"name": "date",
|
|
"description": "The date from which to calculate time from. If not set, the current date and time will be used. When passing a\nstring, it's strongly recommended to use the ISO 8601 format to ensure timezones are handled correctly. To convert\na date to this format in JavaScript, use [`date.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString).",
|
|
"values": [{ "name": "Date" }]
|
|
},
|
|
{
|
|
"name": "format",
|
|
"description": "The formatting style to use.",
|
|
"values": [
|
|
{ "name": "long" },
|
|
{ "name": "short" },
|
|
{ "name": "narrow" }
|
|
]
|
|
},
|
|
{
|
|
"name": "numeric",
|
|
"description": "When `auto`, values such as \"yesterday\" and \"tomorrow\" will be shown when possible. When `always`, values such as\n\"1 day ago\" and \"in 1 day\" will be shown.",
|
|
"values": [{ "name": "always" }, { "name": "auto" }]
|
|
},
|
|
{
|
|
"name": "sync",
|
|
"description": "Keep the displayed value up to date as time passes.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/relative-time"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-resize-observer",
|
|
"description": "The Resize Observer component offers a thin, declarative interface to the [`ResizeObserver API`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).\n---\n\n\n### **Events:**\n - **sl-resize** - Emitted when the element is resized.\n\n### **Slots:**\n - _default_ - One or more elements to watch for resizing.",
|
|
"attributes": [
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the observer.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/resize-observer"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-skeleton",
|
|
"description": "Skeletons are used to provide a visual representation of where content will eventually be drawn.\n---\n\n\n### **CSS Properties:**\n - **--border-radius** - The skeleton's border radius. _(default: undefined)_\n- **--color** - The color of the skeleton. _(default: undefined)_\n- **--sheen-color** - The sheen color when the skeleton is in its loading state. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **indicator** - The skeleton's indicator which is responsible for its color and animation.",
|
|
"attributes": [
|
|
{
|
|
"name": "effect",
|
|
"description": "Determines which effect the skeleton will use.",
|
|
"values": [
|
|
{ "name": "pulse" },
|
|
{ "name": "sheen" },
|
|
{ "name": "none" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/skeleton"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-spinner",
|
|
"description": "Spinners are used to show the progress of an indeterminate operation.\n---\n\n\n### **CSS Properties:**\n - **--track-width** - The width of the track. _(default: undefined)_\n- **--track-color** - The color of the track. _(default: undefined)_\n- **--indicator-color** - The color of the spinner's indicator. _(default: undefined)_\n- **--speed** - The time it takes for the spinner to complete one animation cycle. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/spinner"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-select",
|
|
"description": "Selects allow you to choose items from a menu of predefined options.\n---\n\n\n### **Events:**\n - **sl-change** - Emitted when the control's value changes.\n- **sl-clear** - Emitted when the control's value is cleared.\n- **sl-input** - Emitted when the control receives input.\n- **sl-focus** - Emitted when the control gains focus.\n- **sl-blur** - Emitted when the control loses focus.\n- **sl-show** - Emitted when the select's menu opens.\n- **sl-after-show** - Emitted after the select's menu opens and all animations are complete.\n- **sl-hide** - Emitted when the select's menu closes.\n- **sl-after-hide** - Emitted after the select's menu closes and all animations are complete.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **show()** - Shows the listbox.\n- **hide()** - Hides the listbox.\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- **focus(options: _FocusOptions_)** - Sets focus on the control.\n- **blur()** - Removes focus from the control.\n\n### **Slots:**\n - _default_ - The listbox options. Must be `<sl-option>` elements. You can use `<sl-divider>` to group items visually.\n- **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **prefix** - Used to prepend a presentational icon or similar element to the combobox.\n- **clear-icon** - An icon to use in lieu of the default clear icon.\n- **expand-icon** - The icon to show when the control is expanded and collapsed. Rotates on open and close.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The select's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **combobox** - The container the wraps the prefix, combobox, clear icon, and expand button.\n- **prefix** - The container that wraps the prefix slot.\n- **display-input** - The element that displays the selected option's label, an `<input>` element.\n- **listbox** - The listbox container where options are slotted.\n- **tags** - The container that houses option tags when `multiselect` is used.\n- **tag** - The individual tags that represent each multiselect option.\n- **tag__base** - The tag's base part.\n- **tag__content** - The tag's content part.\n- **tag__remove-button** - The tag's remove button.\n- **tag__remove-button__base** - The tag's remove button base part.\n- **clear-button** - The clear button.\n- **expand-icon** - The container that wraps the expand icon.",
|
|
"attributes": [
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the select, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the select, submitted as a name/value pair with form data. When `multiple` is enabled, the\nvalue attribute will be a space-delimited list of values based on the options selected, and the value property will\nbe an array. **For this reason, values must not contain spaces.**",
|
|
"values": [{ "name": "string[]" }]
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The select's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "placeholder",
|
|
"description": "Placeholder text to show as a hint when the select is empty.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "multiple",
|
|
"description": "Allows more than one option to be selected.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "max-options-visible",
|
|
"description": "The maximum number of selected options to show when `multiple` is true. After the maximum, \"+n\" will be shown to\nindicate the number of additional items that are selected. Set to 0 to remove the limit.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the select control.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "clearable",
|
|
"description": "Adds a clear button when the select is not empty.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the select is open. You can toggle this attribute to show and hide the menu, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the select's open state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hoist",
|
|
"description": "Enable this option to prevent the listbox from being clipped when the component is placed inside a container with\n`overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "filled",
|
|
"description": "Draws a filled select.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style select with rounded edges.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The select's label. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placement",
|
|
"description": "The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox\ninside of the viewport.",
|
|
"values": [{ "name": "top" }, { "name": "bottom" }]
|
|
},
|
|
{
|
|
"name": "help-text",
|
|
"description": "The select's help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "The select's required attribute.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "getTag",
|
|
"description": "A function that customizes the tags to be rendered when multiple=true. The first argument is the option, the second\nis the current tag's index. The function should return either a Lit TemplateResult or a string containing trusted HTML of the symbol to render at\nthe specified value.",
|
|
"values": [
|
|
{ "name": "(option: SlOption, index: number) => TemplateResult" },
|
|
{ "name": "HTMLElement" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/select"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-split-panel",
|
|
"description": "Split panels display two adjacent panels, allowing the user to reposition them.\n---\n\n\n### **Events:**\n - **sl-reposition** - Emitted when the divider's position changes.\n\n### **Slots:**\n - **start** - Content to place in the start panel.\n- **end** - Content to place in the end panel.\n- **divider** - The divider. Useful for slotting in a custom icon that renders as a handle.\n\n### **CSS Properties:**\n - **--divider-width** - The width of the visible divider. _(default: 4px)_\n- **--divider-hit-area** - The invisible region around the divider where dragging can occur. This is usually wider than the divider to facilitate easier dragging. _(default: 12px)_\n- **--min** - The minimum allowed size of the primary panel. _(default: 0)_\n- **--max** - The maximum allowed size of the primary panel. _(default: 100%)_\n\n### **CSS Parts:**\n - **start** - The start panel.\n- **end** - The end panel.\n- **panel** - Targets both the start and end panels.\n- **divider** - The divider that separates the start and end panels.",
|
|
"attributes": [
|
|
{
|
|
"name": "position",
|
|
"description": "The current position of the divider from the primary panel's edge as a percentage 0-100. Defaults to 50% of the\ncontainer's initial size.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "position-in-pixels",
|
|
"description": "The current position of the divider from the primary panel's edge in pixels.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "vertical",
|
|
"description": "Draws the split panel in a vertical orientation with the start and end panels stacked.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables resizing. Note that the position may still change as a result of resizing the host element.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "primary",
|
|
"description": "If no primary panel is designated, both panels will resize proportionally when the host element is resized. If a\nprimary panel is designated, it will maintain its size and the other panel will grow or shrink as needed when the\nhost element is resized.",
|
|
"values": [{ "name": "start" }, { "name": "end" }]
|
|
},
|
|
{
|
|
"name": "snap",
|
|
"description": "One or more space-separated values at which the divider should snap. Values can be in pixels or percentages, e.g.\n`\"100px 50%\"`.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "snap-threshold",
|
|
"description": "How close the divider must be to a snap point until snapping occurs.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/split-panel"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-switch",
|
|
"description": "Switches allow the user to toggle an option on or off.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the control loses focus.\n- **sl-change** - Emitted when the control's checked state changes.\n- **sl-input** - Emitted when the control receives input.\n- **sl-focus** - Emitted when the control 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 switch.\n- **focus(options: _FocusOptions_)** - Sets focus on the switch.\n- **blur()** - Removes focus from the switch.\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 switch's label.\n\n### **CSS Properties:**\n - **--width** - The width of the switch. _(default: undefined)_\n- **--height** - The height of the switch. _(default: undefined)_\n- **--thumb-size** - The size of the thumb. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **control** - The control that houses the switch's thumb.\n- **thumb** - The switch's thumb.\n- **label** - The switch's label.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the switch, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the switch, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The switch's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the switch.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "checked",
|
|
"description": "Draws the switch in a checked state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Makes the switch a required field.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/switch"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tab-group",
|
|
"description": "Tab groups organize content into a container that shows one section at a time.\n---\n\n\n### **Events:**\n - **sl-tab-show** - Emitted when a tab is shown.\n- **sl-tab-hide** - Emitted when a tab is hidden.\n\n### **Methods:**\n - **show(panel: _string_)** - Shows the specified tab panel.\n\n### **Slots:**\n - _default_ - Used for grouping tab panels in the tab group. Must be `<sl-tab-panel>` elements.\n- **nav** - Used for grouping tabs in the tab group. Must be `<sl-tab>` elements.\n\n### **CSS Properties:**\n - **--indicator-color** - The color of the active tab indicator. _(default: undefined)_\n- **--track-color** - The color of the indicator's track (the line that separates tabs from panels). _(default: undefined)_\n- **--track-width** - The width of the indicator's track (the line that separates tabs from panels). _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **nav** - The tab group's navigation container where tabs are slotted in.\n- **tabs** - The container that wraps the tabs.\n- **active-tab-indicator** - The line that highlights the currently selected tab.\n- **body** - The tab group's body where tab panels are slotted in.\n- **scroll-button** - The previous/next scroll buttons that show when tabs are scrollable, an `<sl-icon-button>`.\n- **scroll-button--start** - The starting scroll button.\n- **scroll-button--end** - The ending scroll button.\n- **scroll-button__base** - The scroll button's exported `base` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "placement",
|
|
"description": "The placement of the tabs.",
|
|
"values": [
|
|
{ "name": "top" },
|
|
{ "name": "bottom" },
|
|
{ "name": "start" },
|
|
{ "name": "end" }
|
|
]
|
|
},
|
|
{
|
|
"name": "activation",
|
|
"description": "When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel. When set to\nmanual, the tab will receive focus but will not show until the user presses spacebar or enter.",
|
|
"values": [{ "name": "auto" }, { "name": "manual" }]
|
|
},
|
|
{
|
|
"name": "no-scroll-controls",
|
|
"description": "Disables the scroll arrows that appear when tabs overflow.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tab-group"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tab",
|
|
"description": "Tabs are used inside [tab groups](/components/tab-group) to represent and activate [tab panels](/components/tab-panel).\n---\n\n\n### **Events:**\n - **sl-close** - Emitted when the tab is closable and the close button is activated.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus to the tab.\n- **blur()** - Removes focus from the tab.\n\n### **Slots:**\n - _default_ - The tab's label.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **close-button** - The close button, an `<sl-icon-button>`.\n- **close-button__base** - The close button's exported `base` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "panel",
|
|
"description": "The name of the tab panel this tab is associated with. The panel must be located in the same tab group.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "active",
|
|
"description": "Draws the tab in an active state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "closable",
|
|
"description": "Makes the tab closable and shows a close button.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the tab and prevents selection.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tab"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-textarea",
|
|
"description": "Textareas collect data from the user and allow multiple lines of text.\n---\n\n\n### **Events:**\n - **sl-blur** - Emitted when the control loses focus.\n- **sl-change** - Emitted when an alteration to the control's value is committed by the user.\n- **sl-focus** - Emitted when the control gains focus.\n- **sl-input** - Emitted when the control receives input.\n- **sl-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Methods:**\n - **focus(options: _FocusOptions_)** - Sets focus on the textarea.\n- **blur()** - Removes focus from the textarea.\n- **select()** - Selects all the text in the textarea.\n- **scrollPosition(position: _{ top?: number; left?: number }_): _{ top: number; left: number } | undefined_** - Gets or sets the textarea's scroll position.\n- **setSelectionRange(selectionStart: _number_, selectionEnd: _number_, selectionDirection: _'forward' | 'backward' | 'none'_)** - Sets the start and end positions of the text selection (0-based).\n- **setRangeText(replacement: _string_, start: _number_, end: _number_, selectMode: _'select' | 'start' | 'end' | 'preserve'_)** - Replaces a range of text with a new string.\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 - **label** - The textarea's label. Alternatively, you can use the `label` attribute.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n\n### **CSS Parts:**\n - **form-control** - The form control that wraps the label, input, and help text.\n- **form-control-label** - The label's wrapper.\n- **form-control-input** - The input's wrapper.\n- **form-control-help-text** - The help text's wrapper.\n- **base** - The component's base wrapper.\n- **textarea** - The internal `<textarea>` control.",
|
|
"attributes": [
|
|
{ "name": "title", "values": [] },
|
|
{
|
|
"name": "name",
|
|
"description": "The name of the textarea, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "value",
|
|
"description": "The current value of the textarea, submitted as a name/value pair with form data.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The textarea's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "filled",
|
|
"description": "Draws a filled textarea.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "label",
|
|
"description": "The textarea's label. If you need to display HTML, use the `label` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "help-text",
|
|
"description": "The textarea's help text. If you need to display HTML, use the `help-text` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placeholder",
|
|
"description": "Placeholder text to show as a hint when the input is empty.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "rows",
|
|
"description": "The number of rows to display by default.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "resize",
|
|
"description": "Controls how the textarea can be resized.",
|
|
"values": [
|
|
{ "name": "none" },
|
|
{ "name": "vertical" },
|
|
{ "name": "auto" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the textarea.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "readonly",
|
|
"description": "Makes the textarea readonly.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "form",
|
|
"description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "required",
|
|
"description": "Makes the textarea a required field.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "minlength",
|
|
"description": "The minimum length of input that will be considered valid.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "maxlength",
|
|
"description": "The maximum length of input that will be considered valid.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autocapitalize",
|
|
"description": "Controls whether and how text input is automatically capitalized as it is entered by the user.",
|
|
"values": [
|
|
{ "name": "off" },
|
|
{ "name": "none" },
|
|
{ "name": "on" },
|
|
{ "name": "sentences" },
|
|
{ "name": "words" },
|
|
{ "name": "characters" }
|
|
]
|
|
},
|
|
{
|
|
"name": "autocorrect",
|
|
"description": "Indicates whether the browser's autocorrect feature is on or off.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autocomplete",
|
|
"description": "Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n[this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "autofocus",
|
|
"description": "Indicates that the input should receive focus on page load.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "enterkeyhint",
|
|
"description": "Used to customize the label or icon of the Enter key on virtual keyboards.",
|
|
"values": [
|
|
{ "name": "enter" },
|
|
{ "name": "done" },
|
|
{ "name": "go" },
|
|
{ "name": "next" },
|
|
{ "name": "previous" },
|
|
{ "name": "search" },
|
|
{ "name": "send" }
|
|
]
|
|
},
|
|
{
|
|
"name": "spellcheck",
|
|
"description": "Enables spell checking on the textarea.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "inputmode",
|
|
"description": "Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\nkeyboard on supportive devices.",
|
|
"values": [
|
|
{ "name": "none" },
|
|
{ "name": "text" },
|
|
{ "name": "decimal" },
|
|
{ "name": "numeric" },
|
|
{ "name": "tel" },
|
|
{ "name": "search" },
|
|
{ "name": "email" },
|
|
{ "name": "url" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/textarea"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tab-panel",
|
|
"description": "Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.\n---\n\n\n### **Slots:**\n - _default_ - The tab panel's content.\n\n### **CSS Properties:**\n - **--padding** - The tab panel's padding. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [
|
|
{
|
|
"name": "name",
|
|
"description": "The tab panel's name.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "active",
|
|
"description": "When true, the tab panel will be shown.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tab-panel"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tag",
|
|
"description": "Tags are used as labels to organize things or to indicate a selection.\n---\n\n\n### **Events:**\n - **sl-remove** - Emitted when the remove button is activated.\n\n### **Slots:**\n - _default_ - The tag's content.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **content** - The tag's content.\n- **remove-button** - The tag's remove button, an `<sl-icon-button>`.\n- **remove-button__base** - The remove button's exported `base` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "variant",
|
|
"description": "The tag's theme variant.",
|
|
"values": [
|
|
{ "name": "primary" },
|
|
{ "name": "success" },
|
|
{ "name": "neutral" },
|
|
{ "name": "warning" },
|
|
{ "name": "danger" },
|
|
{ "name": "text" }
|
|
]
|
|
},
|
|
{
|
|
"name": "size",
|
|
"description": "The tag's size.",
|
|
"values": [
|
|
{ "name": "small" },
|
|
{ "name": "medium" },
|
|
{ "name": "large" }
|
|
]
|
|
},
|
|
{
|
|
"name": "pill",
|
|
"description": "Draws a pill-style tag with rounded edges.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "removable",
|
|
"description": "Makes the tag removable and shows a remove button.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tag"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tooltip",
|
|
"description": "Tooltips display additional information based on a specific action.\n---\n\n\n### **Events:**\n - **sl-show** - Emitted when the tooltip begins to show.\n- **sl-after-show** - Emitted after the tooltip has shown and all animations are complete.\n- **sl-hide** - Emitted when the tooltip begins to hide.\n- **sl-after-hide** - Emitted after the tooltip has hidden and all animations are complete.\n\n### **Methods:**\n - **show()** - Shows the tooltip.\n- **hide()** - Hides the tooltip\n\n### **Slots:**\n - _default_ - The tooltip's target element. Avoid slotting in more than one element, as subsequent ones will be ignored.\n- **content** - The content to render in the tooltip. Alternatively, you can use the `content` attribute.\n\n### **CSS Properties:**\n - **--max-width** - The maximum width of the tooltip before its content will wrap. _(default: undefined)_\n- **--hide-delay** - The amount of time to wait before hiding the tooltip when hovering. _(default: undefined)_\n- **--show-delay** - The amount of time to wait before showing the tooltip when hovering. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper, an `<sl-popup>` element.\n- **base__popup** - The popup's exported `popup` part. Use this to target the tooltip's popup container.\n- **base__arrow** - The popup's exported `arrow` part. Use this to target the tooltip's arrow.\n- **body** - The tooltip's body where its content is rendered.",
|
|
"attributes": [
|
|
{
|
|
"name": "content",
|
|
"description": "The tooltip's content. If you need to display HTML, use the `content` slot instead.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "placement",
|
|
"description": "The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport.",
|
|
"values": [
|
|
{ "name": "" },
|
|
{ "name": "top" },
|
|
{ "name": "top-start" },
|
|
{ "name": "top-end" },
|
|
{ "name": "right" },
|
|
{ "name": "right-start" },
|
|
{ "name": "right-end" },
|
|
{ "name": "bottom" },
|
|
{ "name": "bottom-start" },
|
|
{ "name": "bottom-end" },
|
|
{ "name": "left" },
|
|
{ "name": "left-start" },
|
|
{ "name": "left-end" }
|
|
]
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the tooltip so it won't show when triggered.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "distance",
|
|
"description": "The distance in pixels from which to offset the tooltip away from its target.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "open",
|
|
"description": "Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "skidding",
|
|
"description": "The distance in pixels from which to offset the tooltip along its target.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "trigger",
|
|
"description": "Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\noptions can be passed by separating them with a space. When manual is used, the tooltip must be activated\nprogrammatically.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "hoist",
|
|
"description": "Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tooltip"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tree-item",
|
|
"description": "A tree item serves as a hierarchical node that lives inside a [tree](/components/tree).\n---\n\n\n### **Events:**\n - **sl-expand** - Emitted when the tree item expands.\n- **sl-after-expand** - Emitted after the tree item expands and all animations are complete.\n- **sl-collapse** - Emitted when the tree item collapses.\n- **sl-after-collapse** - Emitted after the tree item collapses and all animations are complete.\n- **sl-lazy-change** - Emitted when the tree item's lazy state changes.\n- **sl-lazy-load** - Emitted when a lazy item is selected. Use this event to asynchronously load data and append items to the tree before expanding. After appending new items, remove the `lazy` attribute to remove the loading state and update the tree.\n\n### **Methods:**\n - **getChildrenItems({ includeDisabled = true }: _{ includeDisabled?: boolean }_): _SlTreeItem[]_** - Gets all the nested tree items in this node.\n\n### **Slots:**\n - _default_ - The default slot.\n- **expand-icon** - The icon to show when the tree item is expanded.\n- **collapse-icon** - The icon to show when the tree item is collapsed.\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.\n- **item** - The tree item's container. This element wraps everything except slotted tree item children.\n- **item--disabled** - Applied when the tree item is disabled.\n- **item--expanded** - Applied when the tree item is expanded.\n- **item--indeterminate** - Applied when the selection is indeterminate.\n- **item--selected** - Applied when the tree item is selected.\n- **indentation** - The tree item's indentation container.\n- **expand-button** - The container that wraps the tree item's expand button and spinner.\n- **label** - The tree item's label.\n- **children** - The container that wraps the tree item's nested children.\n- **checkbox** - The checkbox that shows when using multiselect.\n- **checkbox__base** - The checkbox's exported `base` part.\n- **checkbox__control** - The checkbox's exported `control` part.\n- **checkbox__control--checked** - The checkbox's exported `control--checked` part.\n- **checkbox__control--indeterminate** - The checkbox's exported `control--indeterminate` part.\n- **checkbox__checked-icon** - The checkbox's exported `checked-icon` part.\n- **checkbox__indeterminate-icon** - The checkbox's exported `indeterminate-icon` part.\n- **checkbox__label** - The checkbox's exported `label` part.",
|
|
"attributes": [
|
|
{
|
|
"name": "expanded",
|
|
"description": "Expands the tree item.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "selected",
|
|
"description": "Draws the tree item in a selected state.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "disabled",
|
|
"description": "Disables the tree item.",
|
|
"values": []
|
|
},
|
|
{
|
|
"name": "lazy",
|
|
"description": "Enables lazy loading behavior.",
|
|
"values": []
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tree-item"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-tree",
|
|
"description": "Trees allow you to display a hierarchical list of selectable [tree items](/components/tree-item). Items with children can be expanded and collapsed as desired by the user.\n---\n\n\n### **Events:**\n - **sl-selection-change** - Emitted when a tree item is selected or deselected.\n\n### **Slots:**\n - _default_ - The default slot.\n- **expand-icon** - The icon to show when the tree item is expanded. Works best with `<sl-icon>`.\n- **collapse-icon** - The icon to show when the tree item is collapsed. Works best with `<sl-icon>`.\n\n### **CSS Properties:**\n - **--indent-size** - The size of the indentation for nested items. _(default: var(--sl-spacing-medium))_\n- **--indent-guide-color** - The color of the indentation line. _(default: var(--sl-color-neutral-200))_\n- **--indent-guide-offset** - The amount of vertical spacing to leave between the top and bottom of the indentation line's starting position. _(default: 0)_\n- **--indent-guide-style** - The style of the indentation line, e.g. solid, dotted, dashed. _(default: solid)_\n- **--indent-guide-width** - The width of the indentation line. _(default: 0)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
"attributes": [
|
|
{
|
|
"name": "selection",
|
|
"description": "The selection behavior of the tree. Single selection allows only one node to be selected at a time. Multiple\ndisplays checkboxes and allows more than one node to be selected. Leaf allows only leaf nodes to be selected.",
|
|
"values": [
|
|
{ "name": "single" },
|
|
{ "name": "multiple" },
|
|
{ "name": "leaf" }
|
|
]
|
|
}
|
|
],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/tree"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sl-visually-hidden",
|
|
"description": "The visually hidden utility makes content accessible to assistive devices without displaying it on the screen.\n---\n\n\n### **Slots:**\n - _default_ - The content to be visually hidden.",
|
|
"attributes": [],
|
|
"references": [
|
|
{
|
|
"name": "Documentation",
|
|
"url": "https://shoelace.style/components/visually-hidden"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|