The American Express Design System provides a unified language for designing American Express websites and experiences. The design system provides design resources that match our coded components and are aligned with the American Express brand. Included are colors, components, icons and glyphs, type styles, and graphic assets to get you up and running quickly.
On this page
Converts a v6 Step component to a v7 Step component.
current prop as it is a deprecated internal prop.active prop as it is a deprecated internal prop.last prop as it is a deprecated internal prop.onlyShowLabel prop as it is a deprecated internal prop.currentSubStep prop. See currentSubStep and subStepLabels manual changes below.isInProgress prop. See currentSubStep and subStepLabels manual changes below.gatewayIcon prop. See securityConfig manual changes below.gatewayLabel prop. See securityConfig manual changes below.gatewayCompleteLabel prop. See securityConfig manual changes below.theme prop to the className prop. If it cannot, deletes the theme prop.For example:
import { Step } from '@americanexpress/dls-react6';
export default function Page() {
return (
<Step
label="Step 1"
current={false}
active={false}
last={false}
onlyShowLabel={false}
currentSubStep={1}
isInProgress={isInProgress}
gatewayIcon={gatewayIcon}
gatewayLabel={gatewayLabel}
gatewayCompleteLabel={gatewayCompleteLabel}
theme={{ color: 'red' }}
{...otherProps}
/>
);
}
Transforms into:
import { Step } from '@americanexpress/dls-react';
export default function Page() {
return <Step label="Step 1" {...otherProps} />;
}
currentSubStep and subStepLabelsIn order to have sub-steps in v7, supply the currentSubStep prop to the MultiStepTracker and the subStepLabels prop to each Step which has sub-steps. For example:
import { MultiStepTracker, Step } from '@americanexpress/dls-react';
export default function Page() {
return (
<MultiStepTracker currentStep={1} currentSubStep={1}>
<Step label="Step 1" subStepLabels={['Substep 1', 'Substep 2']} />
<Step label="Step 2" />
</MultiStepTracker>
);
}
securityConfigIn order to have a <IconLock /> associated with a given Step, supply the securityConfig: { isLocked: boolean, label: string} prop. For example:
import { MultiStepTracker, Step } from '@americanexpress/dls-react';
export default function Page() {
return (
<MultiStepTracker currentStep={1}>
<Step
label="Step 1"
securityConfig={{ isLocked: true, label: 'Verify Card Number' }}
/>
<Step label="Step 2" />
</MultiStepTracker>
);
}
Connect with the DLS Team on Slack or by email.
Check out additional resources.