diff --git a/ui/packages/consul-ui/app/components/shadow-template/README.mdx b/ui/packages/consul-ui/app/components/shadow-template/README.mdx new file mode 100644 index 000000000..3f2556526 --- /dev/null +++ b/ui/packages/consul-ui/app/components/shadow-template/README.mdx @@ -0,0 +1,162 @@ +# ShadowTemplate + +A component to aid creating ShadowDOM based components (when required), heavily +inspired by the upcoming Declarative Shadow DOM spec, a new way to implement and +use Shadow DOM directly in HTML. + +Instead of passing `shadowroot="open|closed"` as you would with Declarative +Shadow DOM we have a `@shadowRoot` argument to which you would pass the actual +Shadow DOM element (which itself either open or closed). You can get a reference +to this by using the `{{attach-shadow}}` modifier. + +Additionally a `@stylesheets` argument is made available for you to optionally +pass completely isolated, scoped, constructable stylesheets to be used for the +Shadow DOM tree (you can also continue to use `