{% set hasSidebar = true %} {% set hasOutline = true %} {% set component = components[page.fileSlug] %} {% set description = component.summary %} {% extends '../_includes/base.njk' %} {# Component header #} {% block beforeContent %}
<{{ component.tagName }}>
{{ component.summary | inlineMarkdown | safe }}
{% endblock %} {# Content #} {% block content %} {{ content | safe }} {% endblock %} {# Component API #} {% block afterContent %} {# Slots #} {% if component.slots.length %}Learn more about using slots.
| Name | Description |
|---|---|
{% if slot.name %}
{{ slot.name }}
{% else %}
(default)
{% endif %}
|
{{ slot.description | inlineMarkdown | safe }} |
Learn more about attributes and properties.
| Name | Description | Reflects | |
|---|---|---|---|
{{ prop.name }}{% if prop.attribute %} {{ prop.attribute }} |
{{ prop.description | inlineMarkdown | safe }}
{% if prop.type.text %}
Type
{% endif %}
{% if prop.default %}
{{ prop.type.text | trimPipes | inlineMarkdown | safe }}Default
{% endif %}
{{ prop.default | inlineMarkdown | safe }} |
{% if prop.reflects %}
|
Learn more about methods.
| Name | Description | Arguments |
|---|---|---|
{{ method.name }}() |
{{ method.description | inlineMarkdown | safe }} |
{% if method.parameters.length %}
{% for param in method.parameters %}
{{ param.name }}: {{ param.type.text | trimPipes }}{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
|
Learn more about events.
| Name | Description |
|---|---|
{{ event.name }} |
{{ event.description | inlineMarkdown | safe }} |
Learn more about CSS custom properties.
| Name | Description |
|---|---|
{{ cssProperty.name }} |
{{ cssProperty.description | inlineMarkdown | safe }}
{% if cssProperty.default %}
Default
{% endif %}
{{ cssProperty.default }}
|
Learn more about custom states.
| Name | Description | CSS selector |
|---|---|---|
{{ state.name }} |
{{ state.description | inlineMarkdown | safe }} | :state({{ state.name }}) |
Learn more about CSS parts.
| Name | Description |
|---|---|
{{ cssPart.name }} |
{{ cssPart.description | inlineMarkdown | safe }} |
This component automatically imports the following elements. Sub-dependencies, if any exist, will also be included in this list.
<{{ dependency }}>The autoloader is the recommended way to import components. If you prefer to do it manually, use one of the following code snippets.
To manually import this component from the CDN, use the following code.
import '{% cdnUrl component.path %}';
To manually import this component from React, use the following code.
import '@shoelace-style/webawesome/react/{{ component.tagName | stripPrefix }}';
#}