ui/Slottable

Provides a higher-order component that render child components into pre-designated slots.

See SlotItem for the use of Slottable.

import Slottable from '@enact/ui/Slottable';

Members

SlottableHigher-Order Component

A higher-order component that allows wrapped components to separate children into pre-designated 'slots'.

To use Slottable, you must configure it by passing in a config object with the slots member set to an array of slot names. Any children whose slot or defaultSlot property matches a named slot or whose type matches a named slot will be placed into a property of the same name on the wrapped component.

import Slottable from '@enact/ui/Slottable';
Configuration
slots
ArrayString

Array of slot names which will be extracted from children and distributed to props.

ArrayBooleanFunctionModuleNumberObjectString