Skip to content

BooleanRectangularStickyToggleButton

Overview

A rectangular toggle button that switches the value of a boolean Property. It sticks in the down position when pressed, popping back up when pressed again.

This class inherits from the more general RectangularStickyToggleButton, which can take any values.

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

Class BooleanRectangularStickyToggleButton

import { BooleanRectangularStickyToggleButton } from 'scenerystack/sun';

Constructor

new BooleanRectangularStickyToggleButton( booleanProperty : TProperty<boolean>, providedOptions? : BooleanRectangularStickyToggleButtonOptions )

Instance Methods

Type BooleanRectangularStickyToggleButtonOptions

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

RectangularStickyToggleButtonOptions

Source Code

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