> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/component/template/slot/slot-api.md).

# Slot API

{% tabs %}
{% tab title="📘 手冊" %}

* [HTMLSlotElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement)
  * [.assignedElements()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements) : `Element[]`&#x20;
    {% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

* `node.assignedSlot` \
  the **`<slot>`** element that the `node` is assigned to.<br>
* `slot.assignedNodes({flatten: true/false})` \
  **nodes assigned to the slot**. (`flatten = false` by default, if set to`true`, then it looks more deeply into the flattened DOM)<br>
* [`slot.assignedElements({flatten: true/false})`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement/assignedElements) \
  **elements** assigned to the slot (same as above, but **only element nodes**).
