Custom Theme
Customize UI widgets. You can change the colors, the typography, and much more.
Basic usage
To customize the UI widgets, you need to specify a theme JSON object either in the Appmixer constructor:
const appmixer = new Appmixer({
theme: {
variables: {
font: {
family: "sans-serif"
},
colors: {
neutral: "orange"
}
}
}
});and/or use the option with individual widgets:
const flowManager = appmixer.ui.FlowManager({
el: "#my-flow-manager",
theme: {
variables: {
colors: {
neutral: "purple"
}
}
}
});Usage with multiple themes
If you wish to switch between themes, use the set("theme") method, this will automatically re-render the UI applying your new theme:
Variables
The easiest way to change the overall styling is to use the theme variables. The following example shows a complete list of variables that you can set in your theme to match your product branding:
Shapes
Shapes of connectors in diagrams are customizable by choosing a preset in your theme.
Change the values of the entries to switch between presets. Here are built-ins per shape type:
action
action-vertical
action-dark
action-vertical-dark
trigger
trigger-vertical
trigger-dark
trigger-vertical-dark
selection
selection-vertical
selection-dark
selection-vertical-dark
action/trigger

action-vertical/trigger-vertical

action-dark/trigger-dark
Special version of actions and triggers that works better on dark backgrounds.

action-vertical-dark/trigger-vertical-dark
Special version of vertical actions and triggers that works better on dark backgrounds.

Charts
Charts (used in the Insights widgets - Insights Logs, Insights Chart Editor and Insights Dashboard) are customizable by a unique set of non-CSS properties. The values default to the current theme variables, except for colorway. The colorway option specifies the dynamic colors automatically picked by charts.

Advanced UI Styling
The theme JSON object references the entire Appmixer SDK UI in a complex tree of selectors. Elements use a hash symbol (#) prefix and dynamic states use the at sign (@). Each branch in the tree may hold nested selectors and any valid CSS properties for the element. The selectors are available for advanced customizations, but the structure may change between the Appmixer versions.
Colors
The numbers in the names of colors refer to a foreground opacity of the color over the base background color:
neutral96is a foreground color with 96% opacity over the backgroundneutral00.Some colors need a negative color
NGon top. For example, a white text on a blue button.
Font
The numbers in size of the font refer to the defaults in pixels: size13 variable default is 13px.
Complete Theme Object
For reference, we prepared a dark theme for all the Appmixer UI widgets that you can use as a quick overview of all the UI elements that you can set your custom theme for:
Screenshots of the dark theme for some of the UI widgets:




Last updated
Was this helpful?
