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 PhoneInput component to a v7 PhoneInput component.
disabled prop to aria-disabled.inputLabel prop to label.options prop to selectOptions.selectLabel prop to labelOverrides.selectScreenReaderLabel.theme prop to the className prop. If it cannot, deletes the theme prop.PhoneInput is being used as a multi-country phone input (if the selectOptions prop is supplied), renames locale to selectedLocale.For example:
import { PhoneInput } from '@americanexpress/dls-react6';
export default function Page() {
return (
<PhoneInput
locale={locale}
options={options}
disabled={isDisabled}
inputLabel="Phone Number"
selectLabel="Country"
theme={{ color: 'red' }}
{...otherProps}
/>
);
}
Transforms into:
import { PhoneInput } from '@americanexpress/dls-react';
export default function Page() {
return (
<PhoneInput
selectOptions={options}
aria-disabled={isDisabled}
label="Phone Number"
selectedLocale={locale}
{...otherProps}
labelOverrides={{
selectScreenReaderLabel: 'Country',
}}
/>
);
}
In v6, the locale prop was used for both single-country and multi-country variations. In v7, use the locale prop for single-country and the selectedLocale/defaultSelectedLocale props for multi-country.
Connect with the DLS Team on Slack or by email.
Check out additional resources.