API REFERENCE · UTILITIES
<dj-theme>
Scopes a theme to part of the page.
Set theme to light or dark. dj-theme sets data-dj-theme on itself, so the token rules in theme.css apply, and the tokens inherit into descendants and their shadow roots.
autoremoves the attribute. The subtree then follows the surrounding theme, or the operating system setting at the page root.- Load
theme.cssonce for the page.
npm install @dojo-ng/theme
import "@dojo-ng/theme";
Properties
| Property | Attribute | Type | Default |
|---|---|---|---|
theme |
theme |
"light""dark""auto" |
"auto" |
Slots
Default slot