Skip to main content

Theming

This is the API reference for UpmadeTheme. It lists the theme groups and their supported properties. All values are CSS strings. Override selected values by spreading an existing preset and replacing only the groups you need.

import { lightTheme, type UpmadeTheme } from '@upmade/vue-editor'

const customTheme: UpmadeTheme = {
...lightTheme,
name: 'brand-theme',
global: { ...lightTheme.global, textPrimary: '#172033' },
engine: { ...lightTheme.engine, backgroundColor: 'transparent' },
toolbar: { ...lightTheme.toolbar, controlSelectedBackgroundColor: '#0f766e' },
}

Use Themes for Vue registration and binding examples.

Global​

borderColor, dividerColor, focusColor, focusRingColor, iconColor, scrollbarThumbColor, textPrimary, textSecondary.

Back To Content​

activeBackgroundColor, backgroundColor, border, boxShadow, color, hoverBackgroundColor.

Checkerboard​

colorDark, colorLight.

Color Palette​

circleBorderColor, hoverBackgroundColor, selectedBackgroundColor.

Context Menu​

backgroundColor, border, boxShadow, dividerColor, itemActiveBackgroundColor, itemColor, itemDisabledColor, itemHoverBackgroundColor.

Current User Dialog​

emailColor, nameColor.

Dialog​

backdropColor, backgroundColor, border, boxShadow, closeButtonActiveBackground, closeButtonBackground, closeButtonColor, closeButtonHoverBackground, closeButtonHoverColor, fontFamily, footerBorder, headerBorder, titleColor.

Dynamic Object​

Overrides the Object corner radius and shadow for dynamic objects, as the CSS variables --upmade-dynamic-object-border-radius and --upmade-dynamic-object-box-shadow. Unset by default, so dynamic objects use object.borderRadius and object.boxShadow. A dynamic object's own borderRadius and boxShadow override both.

PropertyLight defaultDark default
borderRadius(object.borderRadius)(object.borderRadius)
boxShadow(object.boxShadow)(object.boxShadow)

accentColor, background, borderColor, borderRadius, hoverBackgroundColor, hoverBorderColor, menuBorderRadius, selectedBackgroundColor, textColor.

PropertyLight defaultDark default
accentColor#4A7DFF#5B8CFF
selectedBackgroundColor#4A7DFF1Argba(91, 140, 255, 0.2)

Editor​

syncIndicatorBackground, syncIndicatorColor, syncIndicatorSpinnerColor, syncIndicatorSpinnerTrack, syncIndicatorZIndex.

PropertyLight defaultDark default
syncIndicatorSpinnerColor#4A7DFF#5B8CFF

Element Highlight​

Applies to the highlights and the picking highlight drawn inside the pages of iframe objects, see Interacting with iFrame Content. The values are applied as the CSS variables --upmade-element-highlight-color, --upmade-element-highlight-background-color, and --upmade-element-highlight-label-text-color. A custom highlight or picking color is filled with a light tint of that color instead of backgroundColor.

backgroundColor, color, labelTextColor.

PropertyLight defaultDark default
backgroundColorrgba(0, 122, 255, 0.12)rgba(10, 132, 255, 0.18)
color#007AFF#0A84FF
labelTextColor#ffffff#ffffff

Engine​

backgroundColor.

Font Size​

hoverBackgroundColor, selectedBackgroundColor, textColor.

Iframe​

Overrides the Object corner radius and shadow for iframe objects, as the CSS variables --upmade-iframe-border-radius and --upmade-iframe-box-shadow. Unset by default, so iframes use object.borderRadius and object.boxShadow. An iframe's own borderRadius and boxShadow override both.

PropertyLight defaultDark default
borderRadius(object.borderRadius)(object.borderRadius)
boxShadow(object.boxShadow)(object.boxShadow)

Image​

The corner radius and shadow of images, as the CSS variables --upmade-image-border-radius and --upmade-image-drop-shadow. Images are not cards, so they do not use the Object defaults: the radius is unset by default, which keeps square corners. The shadow is a CSS filter made of drop-shadow() functions rather than a box-shadow, so it follows the visible shape of transparent images such as SVGs and icons, rounded corners included. Set it to none to remove it. An image's own borderRadius and dropShadow override both.

PropertyLight defaultDark default
borderRadius(unset: 0)(unset: 0)
dropShadowdrop-shadow(0 1px 1px rgba(20, 18, 31, 0.06)) drop-shadow(0 8px 12px rgba(20, 18, 31, 0.14))drop-shadow(0 1px 1px rgba(0, 0, 0, 0.32)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.44))

Line Endings​

hoverBackgroundColor, labelColor, optionBackground, selectedBackgroundColor.

Loading Placeholder​

Applies to the placeholder the engine draws over an object while its isLoading is true: a grey surface with rounded corners and a glare that sweeps across it. The values are applied as the CSS variables --upmade-loading-placeholder-background-color, --upmade-loading-placeholder-border-radius, --upmade-loading-placeholder-glare-color, --upmade-loading-placeholder-box-shadow, and --upmade-loading-placeholder-animation-duration. borderRadius and boxShadow are unset by default, so the placeholder takes the corner radius of the object it covers and object.boxShadow, and content keeps its corners and shadow when it replaces the placeholder. The glare stops when the user prefers reduced motion.

animationDuration, backgroundColor, borderRadius, glareColor.

PropertyLight defaultDark default
animationDuration1.6s1.6s
backgroundColor#e5e7eb#2a2a2a
borderRadius(the object's radius)(the object's radius)
boxShadow(object.boxShadow)(object.boxShadow)
glareColorrgba(255, 255, 255, 0.6)rgba(255, 255, 255, 0.06)

Login Dialog​

buttonActiveBackground, buttonBackground, buttonBorderColor, buttonHoverBackground, buttonHoverBorderColor, buttonTextColor, spinnerActiveColor, spinnerColor, subtitleColor.

Master Detail​

backButtonColor, backgroundColor, detailBackgroundColor, detailFocusOutline, menuBackgroundColor, menuBorderRight, menuItemActiveBackgroundColor, menuItemBackgroundColor, menuItemChevronColor, menuItemColor, menuItemDisabledColor, menuItemFocusOutline, menuItemHoverBackgroundColor, menuItemSelectedBackgroundColor, menuItemSelectedColor, menuItemSelectedHoverBackgroundColor.

PropertyLight defaultDark default
menuItemSelectedBackgroundColor#4A7DFF#5B8CFF
menuItemSelectedHoverBackgroundColor#4A7DFF#5B8CFF

backgroundColor, border, boxShadow, itemButtonHoverBackgroundColor, itemChildOpenBackgroundColor, itemColor, itemEditingBackgroundColor, itemInputBorder, itemInputBorderColorOnSelected, itemInputCaretColor, itemInputCaretColorOnSelected, itemInputSelectionColor, itemInputSelectionColorOnSelected, itemInputSelectionTextColor, itemInputSelectionTextColorOnSelected, itemOverlayBackgroundColor, itemSelectedBackgroundColor, itemSelectedColor.

PropertyLight defaultDark default
itemInputSelectionColor#4A7DFF#b0b0b0
itemSelectedBackgroundColor#4A7DFF#5B8CFF

More Menu​

backgroundColor, border, borderRadius, boxShadow, buttonActiveBackgroundColor, buttonColor, buttonHoverBackgroundColor, innerBorderRadius.

Notification Card​

backgroundColor, border, borderRadius, boxShadow, color, dismissButtonActiveBackgroundColor, dismissButtonBackgroundColor, dismissButtonBorderRadius, dismissButtonColor, dismissButtonHoverBackgroundColor, dismissButtonSize, errorPillBackgroundColor, errorPillColor, headerGap, headerMarginBottom, headerRightGap, infoPillBackgroundColor, infoPillColor, maxWidth, messageColor, messageFontSize, messageLineHeight, padding, pillBackgroundColor, pillBorderRadius, pillColor, pillFontSize, pillFontWeight, pillHeight, pillPadding, timestampColor, timestampFontSize, warningPillBackgroundColor, warningPillColor.

Numeric Input​

borderColor, borderRadius, focusBorderColor, hoverBorderColor, inputBackground, labelColor, selectionBackground, selectionColor, spinnerActiveBackground, spinnerBackground, spinnerBorderRadius, spinnerColor, spinnerHoverBackground, textColor.

PropertyLight defaultDark default
selectionBackground#4A7DFF#5B8CFF

Object​

The default corner radius and shadow of the canvas objects that are cards: iframes and dynamic objects. They are applied as the CSS variables --upmade-object-border-radius and --upmade-object-box-shadow; set the shadow to none to remove it. iframe and dynamicObject override them for one kind of object, and an object's own borderRadius and boxShadow override both ('none' removes the shadow for that object). Images have their own shadow, see Image.

An iframe's document is always clipped to its rounded corners. A dynamic object clips its content to them too, unless its clipContent is false. Inside a card object, var(--upmade-content-border-radius) holds its resolved radius, so content can round its own corners to match.

PropertyLight defaultDark default
borderRadius12px12px
boxShadow0 1px 2px rgba(20, 18, 31, 0.06), 0 12px 32px -12px rgba(20, 18, 31, 0.22)0 1px 2px rgba(0, 0, 0, 0.32), 0 12px 32px -12px rgba(0, 0, 0, 0.64)

Object Appear​

The appear animation of objects that come onto the canvas from app code or agents: objects added with the editor's addObject() and addObjects(), objects agents place with agent.addObject() (also with instant), and images picked with the image tool. They fade in while they rise into place. Objects added with one addObjects() call appear one after another, stagger apart; the tenth and later objects appear together with the ninth, and calls with more than 50 objects don't animate. Picked images appear together, with their selection. Objects the user draws, pastes or duplicates, the shapes, lines and texts agents draw, objects of collaborators, and loaded or restored documents don't appear.

The animation is purely visual: the object is at its place, with its opacity, from the start, and nothing is written to the document. An iframe appears once its document has loaded, or at once while it shows its loading placeholder, and a group once its children can. Titlebars appear with their objects and stay hidden while their object waits. Screenshots and exports show objects in place. The tokens are applied as the CSS variables --upmade-object-appear-animation-duration, --upmade-object-appear-animation-easing, --upmade-object-appear-distance (in canvas units) and --upmade-object-appear-stagger. Set animationDuration to 0s to turn the animation off. Give animationDuration and stagger as plain times (600ms, 0.6s), not with calc() or var(). It is also off while the user prefers reduced motion.

PropertyLight defaultDark default
animationDuration600ms600ms
animationEasingcubic-bezier(0.33, 1, 0.68, 1)cubic-bezier(0.33, 1, 0.68, 1)
distance14px14px
stagger110ms110ms

Opacity Slider​

activeColor, thumbBorderColor, thumbColor, trackColor.

PropertyLight defaultDark default
activeColor#4A7DFF#5B8CFF
thumbBorderColor#4A7DFF#5B8CFF

Pill Tabs​

background, tabBackground, tabBackgroundHover, tabBackgroundSelected, tabLabelMaxWidth, tabShadowSelected, tabTextColor, tabTextColorSelected.

Selection​

borderColor, boxBackgroundColor, boxBorderColor, handleColor, handleStrokeColor.

PropertyLight defaultDark default
borderColor#4A7DFF#5B8CFF
boxBackgroundColorrgba(74, 125, 255, 0.2)rgba(91, 140, 255, 0.2)
boxBorderColorrgba(74, 125, 255, 0.5)rgba(91, 140, 255, 0.5)
handleStrokeColor#4A7DFF#5B8CFF

Settings​

contentHeadingColor, contentTextColor, descriptionColor, labelColor, shortcutItemBg, shortcutKeyBg, shortcutKeyBorder, shortcutKeyColor.

Shape Fill​

hoverBackgroundColor, optionBackground, selectedBackgroundColor.

Share Dialog​

borderColor, copyButtonBackground, copyButtonColor, copyButtonHoverBackground, copyButtonHoverColor, copySuccessBackground, copySuccessColor, descriptionColor, inputBackground, inputBorderColor, inputTextColor, labelColor, revokeButtonBorderColor, revokeButtonColor, revokeButtonHoverBackground, revokeButtonHoverColor, selectionColor.

PropertyLight defaultDark default
selectionColor#cce5ff#5B8CFF

Slide Toggle​

thumbColor, thumbSize, trackCheckedColor, trackColor, transitionDuration.

PropertyLight defaultDark default
trackCheckedColor#4A7DFF#5B8CFF

Snap​

indicatorFill, indicatorFillInactive, indicatorStroke, indicatorStrokeInactive, lineStroke.

PropertyLight defaultDark default
indicatorFillrgba(74, 125, 255, 0.3)rgba(91, 140, 255, 0.35)
indicatorFillInactivergba(74, 125, 255, 0.18)rgba(91, 140, 255, 0.2)
indicatorStroke#4A7DFF#5B8CFF
indicatorStrokeInactivergba(74, 125, 255, 0.5)rgba(255, 255, 255, 0.45)

Split Button​

backgroundColor, border, boxShadow, color, dividerBackgroundColor, hoverBackgroundColor.

Stroke Size​

hoverBackgroundColor, selectedBackgroundColor.

Text Input​

background, borderColor, borderRadius, focusBorderColor, hoverBorderColor, labelColor, placeholderColor, selectionBackground, selectionColor, suffixBackground, suffixColor, textColor.

PropertyLight defaultDark default
selectionBackground#4A7DFF#5B8CFF

Titlebar​

Applies to object titlebars. height and offset must be pixel values.

activeBackgroundColor, activeBorder, activeBoxShadow, activeButtonFilledBackgroundColor, activeIconColor, activeMutedTextColor, activeTextColor, backgroundColor, border, borderRadius, boxShadow, buttonBorderRadius, buttonFilledBackgroundColor, buttonFilledColor, buttonHoverBackgroundColor, buttonOutlineColor, buttonPressedBackgroundColor, buttonSize, focusRing, fontFamily, fontSize, fontWeight, gap, height, hoverBackgroundColor, iconColor, iconSize, inputBackgroundColor, inputPadding, mutedTextColor, offset, paddingX, selectionBackgroundColor, selectionColor, textColor, titleFontWeight, transition.

Titlebar Menu​

Applies to the menu that the editor opens from a titlebar menu element, see Object Titlebar. The defaults match the context menu.

backgroundColor, border, borderRadius, boxShadow, fontFamily, gap, itemBorderRadius, itemColor, itemFontSize, itemHeight, itemHoverBackgroundColor, itemPadding, maxWidth, minWidth, padding.

Toolbar​

backgroundColor, border, boxShadow, controlActiveBackgroundColor, controlColor, controlHoverBackgroundColor, controlSelectedBackgroundColor, controlSelectedColor, separatorColor.

PropertyLight defaultDark default
controlSelectedBackgroundColor#4A7DFF#5B8CFF

Tooltip​

backgroundColor, border, boxShadow, color.

Utility Panel​

backgroundColor, buttonColor, buttonHoverBackgroundColor, separatorColor.

Watermark​

background, boxShadow, color, logoColor.

logoColor is the colour of the Upmade mark in the badge. A theme that leaves it out gets a mark in the badge's color.

Zoom Panel​

backgroundColor, border, borderRadius, boxShadow, buttonActiveBackgroundColor, buttonBorderRadius, buttonHoverBackgroundColor, buttonSize, gap, iconColor, padding.

Support us

Upmade is an MIT-licensed open source project. If you like the idea of a framework-agnostic infinite canvas library and want to support our work, leave us a star or consider becoming a sponsor.