Include
Fetches an external HTML file and renders it inline. Loads eagerly by default, or lazy to defer until it scrolls into view. Emits nana-load / nana-error.
Usage
html
| 1 | <nana-include src="/partials/footer.html"></nana-include> |
| 2 | <nana-include src="/partials/promo.html" lazy></nana-include> |
Import
ts
| 1 | import "@nana-tec/ui-components/include"; |
Props
| Attribute | Type | Default |
|---|---|---|
src | string | — |
mode | cors | no-cors | same-origin | cors |
allow-scripts | boolean | false |
lazy | boolean | false |