Skip to content

Stepper.Items

The Stepper.Items slot acts as a container for all the Stepper.Item components within the Stepper.

To use Stepper.Items, place it inside the Stepper component as shown below:

import Stepper from '@components/Basic/Stepper/Stepper';
const App = () => {
return (
<Stepper>
<Stepper.Items>
<Stepper.Item selected value="red">red</Stepper.Item>
<Stepper.Item value="green">green</Stepper.Item>
<Stepper.Item value="blue">blue</Stepper.Item>
</Stepper.Items>
</Stepper>
);
};
export default App;
Prop NameTypeDefaultDescription
styleJSX.CSSProperties{}Inline styles applied directly to the container element of the stepper items.
classstring""Additional CSS classes for the container element of the stepper items.
childrenJSX.Element""The children of Stepper.Items should include all Stepper.Item components.

Guide - Customize the container’s appearance

Section titled “Guide - Customize the container’s appearance”

To modify the width of the container displaying the selected item, you can use the following approach:

import Stepper from '@components/Basic/Stepper/Stepper';
const App = () => {
return (
<Stepper>
<Stepper.Items>
<Stepper.Items style={{ width: '200px', flex: 'none' }}>
<Stepper.Item selected value="red">red</Stepper.Item>
<Stepper.Item value="green">green</Stepper.Item>
<Stepper.Item value="blue">blue</Stepper.Item>
</Stepper.Items>
</Stepper>
);
};
export default App;

This slot is used to add individual items to the Stepper and customize their appearance.

Prop NameTypeDefaultDescription
styleJSX.CSSProperties{}Inline styles applied directly to the stepper item element.
classstring""Additional CSS classes for the stepper item element.
valuestringundefinedThe value associated with the stepper item.
selectedbooleanfalseSpecifies whether the stepper item is selected.
childrenJSX.Element""Content of the item, which can include text, HTML, or JSX elements.
import Stepper from '@components/Basic/Stepper/Stepper';
const App = () => {
return (
<Stepper>
<Stepper.Items>
<Stepper.Item selected value="red">red</Stepper.Item>
<Stepper.Item value="green">green</Stepper.Item>
<Stepper.Item value="blue">blue</Stepper.Item>
</Stepper.Items>
</Stepper>
);
};
export default App;