Files
Basalt2/docs/references/elements/Switch.md
Robert Jelic 3504d8a3aa Docs fix
2025-09-13 12:50:01 +02:00

728 B

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

Functions

Method Returns Description
Switch.new table Creates a new Switch instance
Switch:Switch - Initializes the Switch instance
Switch:Switch - Renders the Switch

Switch.new()

Returns

  • table self The created instance

Switch:Switch(props, basalt)

Parameters

  • props table The properties to initialize the element with
  • basalt table The basalt instance

Switch:Switch()