🎉 JointJS has new documentation! 🥳
JointJS+ now comes with a variety of themes ("material", "modern", "dark", and the default theme). It is possible to set the theme globally (applied to all UI components) and to set a different theme for each UI component individually.
Setting the theme globally:
joint.setTheme('material');
This will update the theme for all the components currently rendered, as well as for any components that are rendered from now on.
Setting the theme for an individual component:
var colorPalette = new joint.ui.ColorPalette({
theme: 'material',
options: [
{ content: '#90C3D4' },
{ content: '#D4A190' },
{ content: '#A1D490' },
{ content: '#ffffff' }
]
});
document.body.appendChild(colorPalette.render().el);
And to change the theme of a component that has already been rendered:
colorPalette.setTheme('modern');
Here you can view all the JointJS+ UI plugins for every theme (you can also open it in a separate window) :