Color Mode
theme.colorMode controls root-level light/dark class behavior.
Modes
| Value | Runtime behavior |
|---|---|
inherit | Does not add a root color-mode class. The surrounding app controls dark mode. |
dark | Adds dark on the root theme slot. |
light | Adds fluikit-light on the root theme slot. |
Example
TS
export const darkUsersSchema = {
resource: "users",
theme: {
preset: "tailadmin",
colorMode: "dark"
},
table: {
columns: ["name", "email", "status"]
}
} as const;Runtime note
The color-mode class is only added when resolving the root theme slot. Other slots rely on Tailwind dark: classes or the surrounding DOM.
Adapter note
Some field adapters detect dark mode from the DOM or schema color mode. Check each adapter package for adapter-specific color-mode behavior.