sandstone/ Steps
Provides Sandstone styled component to indicate progress along a continuum.
In the following example, 6 total steps will be displayed with the current step being the 3rd step, having passed the previous 2 steps, with 3 more to go.
import Steps from '@enact/sandstone/Steps';Members
StepsComponent
A full-featured Sandstone-styled step component.
import Steps from '@enact/sandstone/Steps';StepsBaseComponent
Renders a sandstone-styled steps component only basic behavior.
import {StepsBase} from '@enact/sandstone/Steps';Properties
Customizes the component by mapping the supplied collection of CSS class names to the corresponding internal elements and states of this component.
The following classes are supported:
steps- The root class namestep- Applied to each individual stepnumbers- Applied on the steps designated as "numbers" special case (See:Iconrelated props below)past- Applied to the steps preceding the current stepcurrent- Applied to the current stepfuture- Applied to the steps following the current step
When providing a custom
iconComponentit will receive the classes: 'step' (always), 'numbers' (conditionally, based on the "numbers" value), and one of the following three, based on thecurrentstep: 'past', 'current', and 'future'.Indicate the current step.
This is 1-based, not 0-based; as in the first step is
1.Default: 1The icon to use for indicating the current step.
This accepts any icon supported by sandstone/Icon, in addition to a special value: "numbers", which instead of a standard icon, shows the number of the step.
Default: 'numbers'The icon to use for indicating all steps following the current step.
This accepts any icon supported by sandstone/Icon, in addition to a special value: "numbers", which instead of a standard icon, shows the number of the step.
Default: 'numbers'Defines a custom element to use as the icon component.
Use the
cssprop and public class name override system to target the classes applied to this component. This component will be repeatedtotalnumber of times and will also receive thechildrenandsizeprops.Default: sandstone/Icon.IconThe icon to use for indicating all steps preceding the current step.
This accepts any icon supported by sandstone/Icon, in addition to a special value: "numbers", which instead of a standard icon, shows the number of the step.
Default: 'check'The size of the step icons.
This accepts any
sizesupported by sandstone/Icon.Default: 'small'Indicate which steps to skip.
A number or array of step numbers is acceptable.
The icon to use for any skipped steps, past or future.
This accepts any icon supported by sandstone/Icon.
The current step will always show the
currentIconregardless of whether it has been skipped. It's the developer's responsibility to not setcurrentto a skipped step.Default: 'minus'Indicate the total number of steps.
Default: 2
StepsDecoratorHigher-Order Component
Sandstone-specific behaviors to apply to StepsBase.
import {StepsDecorator} from '@enact/sandstone/Steps';