Trails Packages
    Preparing search index...

    Interface AdvancedCustomElementOptions

    Advanced configuration that alters the behavior of the custom element.

    See createCustomElement.

    interface AdvancedCustomElementOptions {
        enableShadowRoot?: boolean;
    }
    Index

    Properties

    enableShadowRoot?: boolean

    Enables or disables the shadow root inside the application's web component.

    Default: true.

    By default, trails applications use a shadow root to avoid conflicts (e.g. styles) with other parts of the site where the application may be embedded.

    Applications that use the entire browser viewport may not need this feature, since there may be no "other" parts that may conflict with the app. In this case, you can disable the shadow root by setting this property to false. In general, UI components used by the app (e.g. from Chakra UI) should work just as well when disabling the shadow root. If you notice any problems, please file an issue.

    If you are developing UI components that are meant to be used in other applications, you should always use a shadow root to ensure that your components work in that setting.