Overview of Code-Only Styling in Gum
mainIn a code-only Gum project, you can style UI controls using several different approaches depending on whether you want to apply styles globally, to specific instances, or based on user interaction.
Available styling strategies include:
- Global Styling: Using
ActiveStylesto provide default styles for all Gum UI elements. - Per-Control Styling: Modifying style values directly on individual control instances.
- State-Based Styling: Specifying styles that trigger in response to user actions like
hoverorpush. - Visual Customization: Adding or removing visual children to change a control's appearance.
- Complex Control Customization: Specialized styling for composite controls like
ListBox,ComboBox,Menu, andMenuItem.