Skip to main content
The widget ships with a polished dark theme by default, and it also supports a light theme plus deep customization — colors, fonts, corners, and button outlines. Everything is configured through a single theme object passed to VirtualTryOn.init(). No CSS files, no overrides, no build step.
Every part of the widget’s UI renders inside a Shadow DOM. That means theming is fully isolated: your site’s CSS never leaks into the widget, and the widget never breaks your styles. You change the look exclusively through the theme object.

How theming works

Pass a theme object to VirtualTryOn.init(). All fields are optional — omit theme entirely and you get the default sage-green dark theme.

Theme modes

The mode field switches the entire color palette. The default is 'dark'.
In light mode, surfaces become white and neutral, and the accent shifts to a darker sage green (#4d7c4b) for stronger contrast against light backgrounds. Shadows are also softened for a lighter feel.

Custom brand colors & fonts

Override individual properties to match your brand. Here is a full theme object using every available option:

Theme options

All parameters are optional. Omit theme entirely to use the default dark appearance.

Examples

Mix and match the options below to match your store. Each tab is a drop-in theme object.
Surfaces become white and neutral. The accent shifts to a darker green for contrast against light backgrounds, and shadows are softened.

Advanced: CSS variables

This section is optional. The theme object covers everything most merchants need — reach for these variables only when inspecting or fine-tuning in dev tools.
Internally, the widget maps your theme parameters to CSS custom properties defined on the Shadow DOM :host — for example --vto-accent, --vto-bg-primary, --vto-radius-md, and --vto-font-sans. You can inspect all of them in your browser’s dev tools by selecting the widget’s shadow root.

Next steps

Widget Overview

See everything the widget does and how it fits together.

Quickstart

Get the widget running and run your first try-on.