USS-styled variant of the built-in UnityEngine.UIElements.Button — no custom subclass. Add the btn class plus modifiers to get Luna's design-system look. Combine size, color, and visual-style classes freely.

Button Component

Setup

xml
<ui:UXML xmlns:ui="UnityEngine.UIElements"> <ui:Button class="btn" /> <ui:Button class="btn btn-lg" /> <ui:Button class="btn red" /> <ui:Button class="btn btn-xl violet" /> <ui:Button class="btn btn-xl violet ghost" /> <ui:Button class="btn btn-xl violet masked" /> <ui:Button class="btn btn-xl violet outline" /> </ui:UXML>

CSS classes

Size

ClassDescription
btnRequired base class
btn-smSmall
btn-lgLarge
btn-xlExtra-large

Color

Add a color name as a class (no value). Available palette: see colors.

xml
<ui:Button class="btn teal" />

Visual style

ClassDescription
ghostTransparent background, text/icon in the button-color. Hover/focus: text/icon shift to the hover tone — the background stays transparent.
maskedTransparent background. Hover/focus: button-color class becomes the background; text color stays.
outlineBorder in the button-color class; text color matches the border.

Animation

Buttons scale to 1.05 on hover/focus and 0.95 on press, with a 120ms ease-out transition. To opt out without changing any other styling, add no-scale.

ClassDescription
no-scaleDisables the hover/focus/press scale animation.
xml
<ui:Button class="btn violet no-scale" />

See also

  • UI Effects — glow, shine, and clay depth on buttons via the luna-fx classes (e.g. class="luna-fx luna-fx-btn luna-fx-clay yellow")
  • Input PromptButton subclass with input-icon support
  • Colors — full color palette

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL