docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Styles

    General usage styling classes for UI components.

    Inheritance
    object
    Styles
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public static class Styles

    Fields

    activeUssClassName

    The styling class used to set an "active" pseudo-state on a element.

    Declaration
    public const string activeUssClassName = "is-active"
    Field Value
    Type Description
    string

    animateInUssClassName

    The styling class used to start animating in an element.

    Declaration
    public const string animateInUssClassName = "animate-in"
    Field Value
    Type Description
    string

    animationRefreshDelayMs

    The delay between Animation Refresh calls.

    Declaration
    public const uint animationRefreshDelayMs = 16
    Field Value
    Type Description
    uint

    checkedUssClassName

    The styling class used to set a "checked" pseudo-state on a element.

    Declaration
    public const string checkedUssClassName = "is-checked"
    Field Value
    Type Description
    string

    cursorUsClassNamePrefix

    The styling class prefix used to set a cursor.

    Declaration
    public const string cursorUsClassNamePrefix = "cursor--"
    Field Value
    Type Description
    string

    elevationUssClassName

    The styling class used to set an element's elevation.

    Declaration
    public const string elevationUssClassName = "appui-elevation-"
    Field Value
    Type Description
    string

    firstChildUssClassName

    The styling class used to set a ":first-child" pseudo-state on a element.

    Declaration
    public const string firstChildUssClassName = "unity-first-child"
    Field Value
    Type Description
    string

    focusedUssClassName

    The styling class used to set a "focus" pseudo-state on a element.

    Declaration
    public const string focusedUssClassName = "is-focused"
    Field Value
    Type Description
    string

    hiddenUssClassName

    The styling class used to hide an element completely.

    Declaration
    public const string hiddenUssClassName = "unity-hidden"
    Field Value
    Type Description
    string

    hoveredUssClassName

    The styling class used to set a "hover" pseudo-state on a element.

    Declaration
    public const string hoveredUssClassName = "is-hovered"
    Field Value
    Type Description
    string

    intermediateUssClassName

    The styling class used to set an "intermediate" pseudo-state on a element.

    Declaration
    public const string intermediateUssClassName = "is-intermediate"
    Field Value
    Type Description
    string

    invalidUssClassName

    The styling class used to set an "invalid" pseudo-state on a element.

    Declaration
    public const string invalidUssClassName = "is-invalid"
    Field Value
    Type Description
    string

    keyboardFocusUssClassName

    The styling class used to set a "keyboard-focus" pseudo-state on a element.

    Declaration
    public const string keyboardFocusUssClassName = "keyboard-focus"
    Field Value
    Type Description
    string

    lastChildUssClassName

    The styling class used to set a ":last-child" pseudo-state on a element.

    Declaration
    public const string lastChildUssClassName = "unity-last-child"
    Field Value
    Type Description
    string

    noArrowUssClassName

    Used in popups to hide the arrow/tip.

    Declaration
    public const string noArrowUssClassName = "no-arrow"
    Field Value
    Type Description
    string

    openUssClassName

    The styling class used to set an "open" pseudo-state on a element.

    Declaration
    public const string openUssClassName = "is-open"
    Field Value
    Type Description
    string

    requiredUssClassName

    The styling class used to set a "required" pseudo-state on a element.

    Declaration
    public const string requiredUssClassName = "is-required"
    Field Value
    Type Description
    string

    selectedUssClassName

    The styling class used to set a "selected" pseudo-state on a element.

    Declaration
    public const string selectedUssClassName = "is-selected"
    Field Value
    Type Description
    string

    Methods

    ToIconSize(Size)

    Converts a Size to a IconSize.

    Declaration
    public static IconSize ToIconSize(this Size size)
    Parameters
    Type Name Description
    Size size

    The size to convert.

    Returns
    Type Description
    IconSize

    The converted IconSize.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when an unknown Size is provided.

    ToSize(IconSize)

    Converts a IconSize to a Size.

    Declaration
    public static Size ToSize(this IconSize size)
    Parameters
    Type Name Description
    IconSize size

    The size to convert.

    Returns
    Type Description
    Size

    The converted Size.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown when an unknown IconSize is provided.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)