Optional
attributeOptional
childrenOptional
defaultDefault theme name (for v0.0.12 and lower the default was light). If enableSystem
is false, the default theme is light
Optional
disableDisable all CSS transitions when switching themes
Optional
enableWhether to indicate to browsers which color scheme is used (dark or light) for built-in UI like inputs and buttons
Optional
enableWhether to switch between dark and light themes based on prefers-color-scheme
Optional
forcedForced theme name for the current page
Optional
nonceNonce string to pass to the inline script and style elements for CSP headers
Optional
scriptProps to pass the inline script
Optional
storageKey used to store theme setting in localStorage
Optional
themesList of all available theme names
Optional
valueMapping of theme name to HTML attribute value. Object where key is the theme name and value is the attribute value
HTML attribute modified based on the active theme. Accepts
class
,data-*
(meaning any data attribute,data-mode
,data-color
, etc.), or an array which could include both