Skip to content
Enact

spotlight/SpotlightRootDecorator

Exports the spotlight/SpotlightRootDecoratorspotlight/SpotlightRootDecorator.SpotlightRootDecorator higher-order component.

SpotlightRootDecorator   Higher-Order Component

Section titled “SpotlightRootDecorator   Higher-Order Component ”

Constructs a higher-order component that initializes and enables Spotlight 5-way navigation within an application.

No additional properties are passed to the wrapped component.

Example:

const App = SpotlightRootDecorator(ApplicationView);

Configuration

A CSS class name to apply globally to every spottable component when it receives spotlight focus.

This is the declarative equivalent of calling setFocusEffectClass imperatively. It acts as an app-wide default

Example:

const App = SpotlightRootDecorator({focusEffectClass: css.focusClass}, AppBase);
Default: null

When true, the contents of the component will not receive spotlight focus after being rendered.

Default: false

Specifies the id of the React DOM tree root node

Default: 'root'