Skip to content

RoundToggleButton

Overview

RoundToggleButton is a round toggle button that toggles the value of a Property between 2 values. It has the same look for both values.

@author John Blanco (PhET Interactive Simulations) @author Sam Reid (PhET Interactive Simulations)

Class RoundToggleButton

import { RoundToggleButton } from 'scenerystack/sun';

Constructor

new RoundToggleButton( property : Property<T>, valueOff : T, valueOn : T, providedOptions? : RoundToggleButtonOptions )

Instance Methods

dispose()

Type RoundToggleButtonOptions

import type { RoundToggleButtonOptions } from 'scenerystack/sun';
  • valueOffSoundPlayer?: TSoundPlayer
    sounds to be played on toggle transitions
  • valueOnSoundPlayer?: TSoundPlayer
  • & RoundButtonOptions

Source Code

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