State

Type class

A named set of setting values, such as "hover", that an element takes on when the state is applied.

Click here for more info

Sources

This information about State is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

State does not extend any other symbol.

State is not extended by any other symbol.

Settings

State does not have any settings.

Private settings

State does not have any private settings.

Properties

State does not have any properties.

Methods

apply()

#

Returns void

Applies the state to its element at once, without animation. The values the element had before are kept in its "default" state, for going back.

applyAnimate(

duration?: undefined | number

)

#

Returns Animations

Applies the state to its element, animating each setting to its new value. Returns the Animation objects, by setting key.

constructor(

entity: E,
settings: Partial

)

#

Returns State

get(

key: Key

)

#

Returns [""]

Returns the state's value for setting key, or fallback if it has none.

Click here for more info

remove(

key: Key

)

#

Returns void

Removes setting key from the state.

Click here for more info

set(

key: Key,
value: [""]

)

#

Returns void

Sets the value setting key takes when the state is applied.

setAll(

settings: Partial

)

#

Returns void

Sets several of the state's settings at once, from an object of key-value pairs.

Click here for more info

Events

State does not have any events.