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:
documentThe 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.
unstable_accentColor
Section titled “unstable_accentColor”Type:
"aurora" | "cobalt" | undefined(optional)Default:
"aurora"The accent color to use for all components under the Root:
"aurora": StrataKit’s preferred green accent color."cobalt": Blue accent color for better compatibility with older, iTwinUI-based applications.