spotlight/Spottable

Exports the spotlight/Spottable.Spottable Higher-order Component and the spotlight/Spottable.spottableClass className. The default export is spotlight/Spottable.Spottable.

import Spottable from '@enact/spotlight/Spottable';

Members

SpottableHigher-Order Component

Constructs a Spotlight 5-way navigation-enabled Higher-order Component.

Example:

const SpottableComponent = Spottable(Component);
import Spottable from '@enact/spotlight/Spottable';
Configuration
emulateMouse
Boolean

Whether or not the component should emulate mouse events as a response to Spotlight 5-way events.

Default: false
Properties added to wrapped component
disabled
Boolean

Whether or not the component is in a disabled state.

Default: false
onSpotlightDisappear
Function

The handler to run when the component is removed while retaining focus.

onSpotlightDown
Function

The handler to run when the 5-way down key is pressed.

onSpotlightLeft
Function

The handler to run when the 5-way left key is pressed.

onSpotlightRight
Function

The handler to run when the 5-way right key is pressed.

onSpotlightUp
Function

The handler to run when the 5-way up key is pressed.

spotlightDisabled
Boolean

When true, the component cannot be navigated using spotlight.

Default: false
tabIndex
Number

The tabIndex of the component. This value will default to -1 if left unset and the control is spottable.

spottableClassstring

The class name for spottable components. In general, you do not need to directly access this class

ArrayBooleanFunctionModuleNumberObjectString