Skip to Content

Theme

live An immutable set of design tokens that define the visual language of the application. Pass a theme through the tree with ThemeProvider and read it in any descendant with ThemeConsumer.Of(context).

Properties

BackgroundColor

The background color of the root canvas or page.

BorderRadius

Corner radius in pixels applied to buttons, cards, and input fields.

Default

A sensible light-theme set of default tokens. Use this as a starting point and override individual tokens with with { … } syntax.

DisabledTextColor

Text color applied to disabled controls and placeholder text.

ErrorColor

Color used to indicate errors and destructive actions.

FontFamily

The SDF font asset applied to all text in this theme’s subtree. Null uses Unity’s default font. Can be overridden per-element via FontAsset.

FontSize

Base font size in pixels used for body text.

FontSizeLarge

Larger font size in pixels used for headings and titles.

FontSizeSmall

Smaller font size in pixels used for captions and helper text.

InputBorderColor

Border color for input fields, dropdowns, scrollbars, and other widget outlines.

OnPrimaryColor

Text or icon color intended for use on top of the primary color.

PrimaryColor

The primary brand color, used for prominent interactive elements.

PrimaryTextColor

Default body text color.

ScrollbarBorder

Whether scrollbars render a visible border.

ScrollbarBorderColor

Color of the scrollbar border. Only applied when ScrollbarBorder is true.

ScrollbarBorderWidth

Width in pixels of the scrollbar border. Only applied when ScrollbarBorder is true.

ScrollbarWidth

Width in pixels of vertical scrollbars and height of horizontal scrollbars.

SecondaryColor

The secondary brand color, used for complementary accents.

SecondaryTextColor

Subdued text color for secondary labels and captions.

SliderDraggerRadius

Corner radius in pixels applied to slider and min-max slider dragger handles.

Spacing

Base spacing unit in pixels used for padding and gaps between elements.

SurfaceColor

The surface color for cards, dialogs, and elevated containers.

TrackColor

Background color for slider tracks and scrollbar track areas.

Last updated on