Steps
Steps visualize the sequence of sub-tasks of a task.
Examples
import React from 'react';
import ReactDOM from 'react-dom';
import { Steps, Step, Text } from 'furl-components';
ReactDOM.render(
<div>
<Steps alignment='vertical'>
<Step>Pricing Plan<Text textStyle='small'>Choose the plan that's best for you.</Text></Step>
<Step>Personal Information<Text textStyle='small'>Add your personal and contact information.</Text></Step>
<Step selected>Billing Information<Text textStyle='small'>Add a payment method to your account.</Text></Step>
<Step>Checkout<Text textStyle='small'>Review your choices and pay for your plan.</Text></Step>
</Steps>
<Steps data={[
'Pricing Plan',
(<>Personal Information<Text textStyle='small'>Add your personal and contact information.</Text></>),
{
selected: true,
content: 'Billing Information'
},
(<>Checkout<Text textStyle='small'>Review your choices and pay for your plan.</Text></>)
]} />
</div>,
document.getElementById('root')
);API
| Property | Description | Type | Default | ||
|---|---|---|---|---|---|
| alignment | steps separator style | string | 'horizontal' | ||
| data | steps data source | array(string/object) | |||
Notes
- You can populate breadcrumbs either via passing children to it or via the use of the
dataprop. Ifdatais provided, it will take precedence over passed children, therefore rendering only the content provided indata. Stepsonly accepts children of theStepcomponent type.dataonly accepts an array of values, each of which can either be a string or an object. Objects in thedataarray must contain acontent, optionally aselectedvalue and any other props that you want to pass.alignmentcan either be'horizontal'or'vertical'.
