Skip to content

OnOffSwitch

Overview

OnOffSwitch is a switch for toggling between true (on) and false (off). The off position is on the left, the on position is on the right.

@author Chris Malley (PixelZoom, Inc.)

Class OnOffSwitch

import { OnOffSwitch } from 'scenerystack/sun';

Constructor

new OnOffSwitch( property : Property<boolean>, providedOptions : OnOffSwitchOptions )

Instance Methods

Type OnOffSwitchOptions

import type { OnOffSwitchOptions } from 'scenerystack/sun';

ToggleSwitchOptions

Source Code

See the source for OnOffSwitch.ts in the sun repository.