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
data
prop. Ifdata
is provided, it will take precedence over passed children, therefore rendering only the content provided indata
. Steps
only accepts children of theStep
component type.data
only accepts an array of values, each of which can either be a string or an object. Objects in thedata
array must contain acontent
, optionally aselected
value and any other props that you want to pass.alignment
can either be'horizontal'
or'vertical'
.