Skip to content

RectangularRadioButton

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/sun/blob/main/js/buttons/RectangularRadioButton.ts for the most up-to-date information.

Overview

RectangularRadioButton is a single rectangular radio button. It typically appears as part of a RectangularRadioButtonGroup, but can be used in other context.

@author Aaron Davis (PhET Interactive Simulations)

Class RectangularRadioButton

import { RectangularRadioButton } from 'scenerystack/sun';

Constructor

new RectangularRadioButton( property : TProperty<T>, value : T, providedOptions? : RectangularRadioButtonOptions )

Instance Methods

dispose()

fire()

fire on up if the button is enabled, public for use in the accessibility tree

Instance Properties

property : TProperty<T>

(readonly)

the Property this button changes

value : T

(readonly)

the value that is set to the Property when this button is pressed

interactionStateProperty : RadioButtonInteractionStateProperty<T>

(readonly)

Static Properties

FlatAppearanceStrategy : TButtonAppearanceStrategy

(readonly)

FlatAppearanceStrategy is a value for RectangularRadioButton options.buttonAppearanceStrategy. It makes radio buttons that look flat, i.e. no shading or highlighting, but that change color on mouseover, press, selected, etc.

ContentAppearanceStrategy : TContentAppearanceStrategy

(readonly)

ContentAppearanceStrategy is a value for RectangularRadioButton options.contentAppearanceStrategy. It changes their look based on the value of interactionStateProperty.

Type RectangularRadioButtonOptions

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

Source Code

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