Skip to content

Root API

import { Root } from "@stratakit/mui";
Base element: <div>

Component to be used at the root of your application. It ensures that StrataKit theme for MUI is applied correctly.

Example:

<Root colorScheme="dark">
<App />
</Root>
Type: "light" | "dark" (required)

The color scheme to use for all components on the page.

Type: ReactNode (optional)
Type: Document | ShadowRoot | undefined (optional)
Default: document

The root node to which this Root component is attached.

This needs to be set when the Root is rendered within shadow DOM or a popout window.