Root API
- Component status:
-
stable
Import
Section titled “Import”import { Root } from "@stratakit/mui";Root.Root
Section titled “Root.Root”
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>colorScheme
Section titled “colorScheme” Type:
"light" | "dark" (required) The color scheme to use for all components on the page.
children
Section titled “children” Type:
ReactNode (optional) rootNode
Section titled “rootNode” 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.