Skip to content

Properties

PropertyTypeDescription
mode'static'
'strict'
'loose'
(required) Defines how the StepIndicator should work. Use static for non-interactive steps. Use strict for a chronological step order, also, the user can navigate between visited steps. Use loose if the user should be able to navigate freely.
dataStep Item[]
string[]
(required) Defines the data/steps showing up in a JavaScript Array or JSON format like [{title,is_current}]. See below for properties of STEP_DATA.
current_stepnumber(optional) Defines the initial step starting from 0. Also defines the furthest step visited when mode="strict". Will update to the new step if changed (but will not trigger the on_change event). Defaults to 0.
overview_titlestring(optional) The title shown inside the <StepIndicatorModal /> supplemental screen reader text for the <StepIndicatorTriggerButton />. Defaults to Steps Overview.
step_titlestring(optional) Label for <StepIndicatorTriggerButton /> and screen reader text for <StepIndicatorItem />. Must contain %step and %count to interpolate current_step and stepCount into the text. Defaults to Step %step of %count.
hide_numbersboolean(optional) Define whether to show automatically counted numbers or not. Defaults to false.
no_animationboolean(optional) If set to true, the height animation on step change and list expansion will be omitted. Defaults to false.
expandedInitiallyboolean(optional) Set to true to have the list be expanded initially. Defaults to false.
outsetboolean(optional) Same as outset in Card. Defaults to false
statusstring(optional) Text for status shown below the step indicator when it is not expanded. Defaults to undefined
status_state['warn', 'info', 'error'](optional) The type of status shown when the status prop is set. Defaults to warn.
skeletonboolean(optional) If set to true, an overlaying skeleton with animation will be shown.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.
sidebar_idstring(deprecated) A unique string-based ID in order to bind together the main component and the sidebar (<StepIndicator.Sidebar />). Both have to get the same ID.
step_title_extendedstring(deprecated) Descriptive label for <StepIndicatorModal />. Must contain %step and %count to interpolate current_step and stepCount into the text. Defaults to You are on step %step of %count.
on_item_renderfunction(deprecated) Deprecated, just use step item title. Callback function whose return is rendered inside each step instead of the default render. Has to return a React Node. Receives parameter { StepItem, element, attributes, props, context }, where props also includes all props from the step object (like title or status) and the <StepItem> is a component that can be used to wrap your returned content.

Step Item Properties

PropertyTypeDescription
titlestring
React.ReactNode
(required) The title of the step.
is_currentboolean(optional) If set to true, this item step will be set as the current selected step. This can be used instead of current_step on the main component.
inactiveboolean(optional) If set to true, this item step will be handled as an inactive step and will not be clickable. Defaults to false.
disabledboolean(optional) If set to true, this step will be handled the same as inactive as well as getting a disabled mouseover and aria-disabled="true. Defaults to false.
statusstring
React.ReactNode
(optional) Is used to set the status text.
status_state'warn'
'info'
'error'
(optional) In case the status state should be info or error. Defaults to warn.
on_renderfunction(deprecated) Deprecated, just use title. Callback function whose return is rendered inside the step instead of the default render (or on_item_render). Has to return a React Node. <br/> Receives parameter { StepItem, element, attributes, props, context }, where props also includes all props in the step object (like title or status) and the <StepItem> is a component that can be used to wrap your returned content.

Step Items example

const steps = [
{ title: 'Active' },
{ title: 'Active and marked as current', is_current: true },
{ title: 'Not active', inactive: true },
{ title: 'Disabled', disabled: true },
{
title: 'Active item with status text',
status: 'Status text',
status_state: 'warn', // defaults to warning
},
]

Translations

More info about translations can be found in the general localization and Eufemia Forms localization docs.

Keynb-NOen-GBsv-SE (beta)
StepIndicator.overview_titleStegoversiktSteps OverviewStegöversikt
StepIndicator.step_titleSteg %step av %count:Step %step of %count:Steg %step av %count