Theming
Match the editor to your brand with config.theme — a preset base, custom color
tokens, border radius, and font family. For a live preview of every option, open
the Playground.
When to use this
- You want the editor to blend into your product's existing look.
- You need light/dark parity, or a fully custom palette.
- You're theming the UI chrome only — not the image content.
Built-in presets
Two presets ship out of the box:
// Dark theme (default)
<ImageEditor src="/photo.jpg" config={{ theme: { preset: "dark" } }} />
// Light theme
<ImageEditor src="/photo.jpg" config={{ theme: { preset: "light" } }} />
ThemeConfig reference
| Property | Type | Default | Description |
|---|---|---|---|
preset | "dark" | "light" | "custom" | "dark" | Base preset. |
colors | Partial<Record<ThemeColorKey, string>> | — | Override individual color tokens. |
borderRadius | string | preset | Global border radius (e.g. "0.5rem"). |
fontFamily | string | preset | Global UI font family. |
Custom colors
Override any color token with the colors property. Values use HSL format
without the hsl() wrapper (e.g. "262 83% 58%").
<ImageEditor
src="/photo.jpg"
config={{
theme: {
preset: "custom",
colors: {
background: "240 10% 4%",
foreground: "0 0% 95%",
primary: "262 83% 58%",
"primary-foreground": "0 0% 100%",
accent: "262 83% 58%",
},
},
}}
/>
Available color keys
background, foreground, card, card-foreground, popover,
popover-foreground, primary, primary-foreground, secondary,
secondary-foreground, muted, muted-foreground, accent,
accent-foreground, destructive, destructive-foreground, border, input,
ring, chart-1, chart-2, chart-3, chart-4, chart-5, sidebar,
sidebar-foreground, sidebar-primary, sidebar-primary-foreground,
sidebar-accent, sidebar-accent-foreground, sidebar-border, sidebar-ring
Next steps
- Customize the Theme — a full worked example with the theme provider.
- Localize the UI — translate the interface.
- Playground — preview themes live.