{% set hasSidebar = true %} {% set hasOutline = true %} {% set component = getComponent('wa-' + page.fileSlug) %} {% set description = component.summary %} {% extends '../_includes/base.njk' %} {# Component header #} {% block beforeContent %}

{{ title }}

<{{ component.tagName }}> Since {{ component.since }} {{ component.status }}

{{ component.summary }}

{% endblock %} {# Content #} {% block content %} {{ content | safe }} {% endblock %} {# Component API #} {% block afterContent %} {# Slots #} {% if component.slots.length %}

Slots

{% for slot in component.slots %} {% endfor %}
Name Description
{% if slot.name %} {{ slot.name }} {% else %} (default) {% endif %} {{ slot.description | inlineMarkdown | safe }}
{% endif %} {# Properties #} {% if component.properties.length %}

Properties

{% for prop in component.properties %} {% endfor %}
Name Attribute Description Reflects Type Default
{{ prop.name }} {% if prop.attribute %} {{ prop.attribute }} {% endif %} {{ prop.description | inlineMarkdown | safe }} {% if prop.reflects %} {% endif %} {% if prop.type.text %} {{ prop.type.text | trimPipes | inlineMarkdown | safe }} {% endif %} {% if prop.default %} {{ prop.default | inlineMarkdown | safe }} {% endif %}
{% endif %} {# Methods #} {% if component.methods.length %}

Methods

{% for method in component.methods %} {% endfor %}
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 %}
{% endif %} {# States #} {% if component.states.length %}

States

{% for state in component.states %} {% endfor %}
Name Description CSS selector
{{ state.name }} {{ state.description | inlineMarkdown | safe }} [data-state-{{ state.name }}]
{% endif %} {# Events #} {% if component.events.length %}

Events

{% for event in component.events %} {% if event.name %} {% endif %} {% endfor %}
Name Description
{{ event.name }} {{ event.description | inlineMarkdown | safe }}
{% endif %} {# Custom Properties #} {% if component.cssProperties.length %}

CSS custom properties

{% for cssProperty in component.cssProperties %} {% endfor %}
Name Description Default
{{ cssProperty.name }} {{ cssProperty.description | inlineMarkdown | safe }} {% if cssProperty.default %} {{ cssProperty.default }} {% endif %}
{% endif %} {# CSS Parts #} {% if component.cssParts.length %}

CSS parts

{% for cssPart in component.cssParts %} {% endfor %}
Name Description CSS selector
{{ cssPart.name }} {{ cssPart.description | inlineMarkdown | safe }} ::part({{ cssPart.name }})
{% endif %} {# Dependencies #} {% if component.dependencies.length %}

Dependencies

This component automatically imports the following elements. Subdependencies, if any exist, will also be included in this list.

{% endif %} {# Importing #}

Importing

The autoloader is the recommended way to import components. If you prefer to do it manually, use one of the following code snippets.

CDN npm React

To manually import this component from the CDN, use the following code.

import '{% cdnUrl component.path %}';
Coming soon! Coming soon! {# NOTE - disabled for alpha

To manually import this component from React, use the following code.

import '@shoelace-style/webawesome/react/{{ component.tagName | stripPrefix }}';
#}
{% endblock %}