Find the class you can actually use—not merely a theme value with a similar name.
This reference covers the classes used by the current shared 2.0 runtime styles and modern theme validation scopes. It separates reusable form roles from native control parts, component structure, and managed states. Editor-only classes, the complete Unity native-theme catalog, and application-specific Demo styling are not advertised as general WindowFramework helpers.
Class names below are written without a leading dot**, ready for AddToClassList("name") or UXML's class attribute. USS selectors add the dot. Names are case-sensitive.
Use the appropriate element type and any required ancestor/child structure.
Do not assume a class adds behavior, validates input, constructs a control, or registers a window.
Do not treat every structural class as a single-purpose theme-value shortcut.
Classes select elements; tokens supply values; IDs identify named parts. Component and state selectors also require their intended structure.
1. Reusable Text and Form Roles
These are the useful starting points for your own form content. They are real classes in WFW.Styling.uss.
Text
form__label-element — themed primary text color and body font size. Use on a Label. Its focus rule uses the accent text color when the element can receive focus.
form_label-element — existing single-underscore spelling sharing the normal label color/size rule. Prefer form__label-element for new content; the focus selector uses that spelling.
var label = new UnityEngine.UIElements.Label("Player details");
label.AddToClassList("form__label-element");
window.Content.Add(label);
Field Spacing and Typography
form__slider-element — primary text color, body font size, and vertical spacing. Use on a real Slider or SliderInt. The class does not create the track, dragger, or value handling; those come from the control.
form__dropdown-element — vertical spacing for dropdown-style fields.
form__enum-element — the same spacing role for enum fields.
Native input appearance comes from the control's own generated classes. Assigning a dropdown helper to a plain VisualElement does not turn it into a popup field.
var volume = new UnityEngine.UIElements.Slider("Volume", 0, 1);
volume.AddToClassList("form__slider-element");
window.Content.Add(volume);
Form Containers and Sections
settings-form — form-card margin, border, radius, and overflow behavior. It is a composite form role, not a background-only class. Its descendant base-field labels receive the form label width, primary color, and body size.
settings-form__title-label — header surface, primary title text, bold weight, padding, and a lower border. Use a Label when text is needed.
settings-form__elements-container — content surface, primary text, and content padding. Useful for a custom form body; it applies more than background color.
settings-form__section — elevated section surface, border, radius, and section spacing.
These classes define appearance/layout, not data binding or validation. Form sections use the shared normal spacing rule.
2. Error, Info, Warning, and Success
The theme supplies these status values:
--wfw-color-error
--wfw-color-info
--wfw-color-warning
--wfw-color-success
--wfw-color-error-subtle
They are custom properties, not class names. The current shared runtime styles do not supply generic standalone classes named error, info, warning, or success for arbitrary controls.
The existing theme-settings-form__name-error class colors a name-validation label using the error token. It also receives scoped status declarations from the selected modern settings. It does not validate the contents of a field or represent a complete general alert component.
For your application's status messages, define an explicit class in your application USS:
.my-status-info {
color: var(--wfw-color-info);
}
.my-status-error {
color: var(--wfw-color-error);
}
Then use it on your text element:
var message = new UnityEngine.UIElements.Label("Profile saved.");
message.AddToClassList("my-status-info");
window.Content.Add(message);
my-status-info and my-status-error are author-owned examples, not built-in classes.** They reuse existing theme values and need no new Developer Extension. Declare an extension only when you want an independent supported setting editable in Studio/player themes.
For a content background, use the equivalent application-rule approach in 5. Theme Your Own Control. There is no built-in background-only class named wfw-surface-background. windowFrame is not its substitute.
3. Native UI Toolkit Controls
The following native classes appear in WindowFramework's rules. Unity's controls normally create them automatically. Instantiate the actual control rather than applying internal part classes to unrelated elements.
Root and Label Classes
unity-label — native Label text; framework rules supply primary text and wrapping.
unity-button — native Button background, text, and radius, with hover/active appearances.
unity-slider — native Slider root, including its label/track/dragger descendant rules.
unity-base-slider — base slider styling scope for its generated tracker/dragger.
unity-scroller — native scrollbar root; the descendant hierarchy supplies its slider and arrow buttons.
Field and Popup Parts
unity-base-field__label — the label part of a BaseField; form scopes add label sizing, while SlideToggle styles use it with their own label class.
unity-base-field__input — a BaseField input part; used with slide-toggle__input in the toggle rules.
unity-base-text-field__input — text/numeric input surface, border, padding, and typography; focus changes its border.
unity-text-element--inner-input-field-component — native inner text element targeted by the named theme-validation input rule. It is not a validation class to assign to arbitrary controls.
unity-base-popup-field__input — popup input background, border, padding, and hover appearance.
unity-base-popup-field__text — popup text color and size.
unity-slider__dragger, unity-base-slider__dragger — thumb appearance, including hover and scrollbar pressed states where selected.
Sunken / Inputs is a value used by these rules and other inputs. Adding a tracker class to your outer custom control is not the general way to reuse that background.
Scrollbar and ScrollView Parts
unity-scroller--vertical, unity-scroller--horizontal — orientation modifiers; control thickness and arrow/slider geometry in their matching descendants.
unity-scroller__slider — the scroller's slider wrapper.
unity-scroller__low-button, unity-scroller__high-button — scrollbar arrow buttons, with orientation-specific positioning/images and hover/pressed styling.
unity-scroll-view__content-container — ScrollView content part; the modal-body scope supplies its content padding.
unity-two-pane-split-view__dragline--horizontal — split-view dragline appearance/cursor in the current rule sheet.
These classes do not create scrolling, dragging, or a split view. That behavior belongs to Unity's corresponding controls.
4. Slide Toggle Structure
Use GWG.Extensions.SlideToggleControl for a functioning slide toggle. Its constructor supplies the required parts and its value controls the checked state.
slide-toggle — control root; row layout, spacing, and minimum height.
slide-toggle__label — label typography and spacing.
slide-toggle__input — track; also uses Unity's BaseField input class.
slide-toggle__input-knob — knob geometry, color, border, and translation.
slide-toggle__input--checked — managed checked-track state and knob travel.
The root's hover/focus/disabled states affect descendants. Adding slide-toggle alone to a plain VisualElement does not supply a knob, click handling, keyboard interaction, or a boolean value.
5. WindowFrame Structure and States
These names are useful when authoring targeted window rules, not as general theme-value shortcuts.
Frame and Lock Indicator
windowFrame — the actual frame root. Applies text/font, background/image, minimum dimensions, borders/radius, padding, and margins together.
windowFrame__fullscreen — frame fullscreen modifier; removes ordinary frame radius/borders and changes named header/footer corners. Set fullscreen through the window API.
context-menu — popup root: surface, text, padding, border, and radius.
context-menu__title-label — title inside context-menu; has its own background, text, padding, and lower border.
context-menu__item — item row inside the root, including hover background.
context-menu__item-label — item label; normal, hovered, and disabled appearances depend on ancestors/state.
context-menu__item-checked-box — checkmark image part; visibility is managed by menu construction.
context-menu__item-disabled — disabled-row modifier, used with the item class and menu root.
context-menu__separator — full-width separator within the menu root.
context-menu__no-option-label — empty-menu message within the root.
For example, .context-menu .context-menu__item:hover is a descendant/state rule. An isolated context-menu__item element without that ancestor will not match it. Adding a disabled style modifier also does not replace validation of the action in your application code.
wfw-modal-header — header row, surface, and padding.
wfw-modal-title — title text, wrapping, and title size.
wfw-modal-close — close affordance's nonshrinking layout role.
wfw-modal-body — body surface and text; its ScrollView content container receives body padding.
wfw-modal-footer — footer surface, text, and padding.
wfw-card — card constraints for available width/height.
wfw-card-hidden — hidden-card state.
wfw-modal-card-viewport — constrained queue viewport and edge padding.
wfw-modal-card-slot — positioned card slot and transition layout.
wfw-modal-card-closing — closing fade state.
Use the actual CardElement for its header/body/footer structure. Copying only a part's class to a custom container will not reproduce the full card hierarchy or its behavior.
8. Supplied Settings Form Families
These classes style the supplied runtime settings interfaces. Some base roles can be reused as described above; family-specific descendants and states need their corresponding structure.
Form Roots
tooltip__settings-form — tooltip settings form root.
context-menu-settings-form — context-menu settings form root.
window-behavior-settings-form — window-behavior form root.
theme-settings-form — theme-selection form root.
They share the form-card role with settings-form.
Family Headers and Content
tooltip__settings-form-title-label, context-menu-settings-form__title-label, window-behavior-settings-form__title-label, theme-settings-form__title-label — family header roles sharing the title styling.
tooltip__settings-form-elements-container, context-menu-settings-form__elements-container, window-behavior-settings-form__elements-container, window-behavior-settings-form__container, theme-settings-form__themes-list — the corresponding content/list roles. The themes-list also has its own zero-padding override.
Theme Collection Rows
theme-settings-form__line-item — collection row inside a theme-settings-form.
The compatibility classes active and default-theme remain in named legacy theme-row selectors. They require that legacy named hierarchy and are not general selected/default styling classes. Prefer the current family-specific states for new matching structures.
9. Named Parts Are Not Classes
WindowFrame also has rules for named elements, including windowFrameHeader, windowFrameTitle, windowFrameContent, windowFrameFooter, windowFrameFooterToolbar, windowFrameOptionsMenu, and windowFrameResizeArea. The tooltip uses Tooltip and TooltipLabel names. Their USS selectors begin with #.
These names identify component parts. They are not arguments to AddToClassList and should not be assigned to arbitrary controls to borrow an isolated color. For example, Header Surface is used by #windowFrameHeader, while Content Background is used by both the frame and its named content area.
Use 5. Theme Your Own Control to write a small application class that consumes the desired token without importing the rest of the component's appearance.
10. Application Examples Are a Separate Category
The additional Demo stylesheet defines demo-hotbar-content and demo-hotbar-slot beneath ToolbarWindowExample.windowFrame. They consume Demo-owned variables and require that type/ancestor context. They are not shared generic content-background or item-slot helpers.
The supplied theme settings can also include the marked Developer Extension example declarations for that hotbar. Those examples do not mean every custom control is already registered in Studio or player-theme preparation. Use your own declarations and application rules for your application's settings.
Choose a Class or Write a Rule?
Use an existing form role when its full appearance/layout is what your control needs.
Instantiate the real native/framework control when you need its generated parts and behavior.
Write an application class using var(...) when you want only one existing theme value, such as content background or info text.
Declare a Developer Extension when you need a new independent supported Studio/player setting.
Continue to Stylesheet Setup and Theme Structure for file layout, registration, scope, and examples. The class names on this page describe actual selectors and their requirements—not a fabricated one-to-one class map for theme values.