{% set hasSidebar = true %} {% set hasOutline = true %} {% set component = components[page.fileSlug] %} {% set description = component.summary %} {% extends '../_includes/base.njk' %} {# Component header #} {% block beforeContent %}

{{ title }}

<{{ component.tagName }}> Since {{ component.since }} {{ component.status }} {# TODO - add a pro flag for pro components #} {% if component.tagName == 'wa-page' %} PRO {% endif %}

{{ component.summary | inlineMarkdown | safe }}

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

Slots

Learn more about using 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 %}

Attributes & Properties

Learn more about attributes and properties.

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

Methods

Learn more about 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 %} {# Events #} {% if component.events.length %}

Events

Learn more about 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

Learn more about CSS custom properties.

{% for cssProperty in component.cssProperties %} {% endfor %}
Name Description
{{ cssProperty.name }}
{{ cssProperty.description | inlineMarkdown | safe }}
{% if cssProperty.default %}
Default {{ cssProperty.default }}
{% endif %}
{% endif %} {# Custom States #} {% if component.cssStates.length %}

Custom States

Learn more about custom states.

{% for state in component.cssStates %} {% endfor %}
Name Description CSS selector
{{ state.name }} {{ state.description | inlineMarkdown | safe }} :state({{ state.name }})
{% endif %} {# CSS Parts #} {% if component.cssParts.length %}

CSS parts

Learn more about CSS parts.

{% for cssPart in component.cssParts %} {% endfor %}
Name Description
{{ cssPart.name }} {{ cssPart.description | inlineMarkdown | safe }}
{% endif %} {# Dependencies #} {% if component.dependencies.length %}

Dependencies

This component automatically imports the following elements. Sub-dependencies, 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 %}