# Switch | Basalt
A UI Framework made for CC:Tweaked

Skip to content

# Switch ​

The Switch is a standard Switch element with click handling and state management.

Extends: `VisualElement`

## Properties ​

Property | Type | Default | Description
--- | --- | --- | ---
checked | boolean | Whether | switch is checked
text | string | Text | to display next to switch
autoSize | boolean | Whether | to automatically size the element to fit switch and text
onBackground | number | Background | color when ON
offBackground | number | Background | color when OFF