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 the v6 Select component to the v7 SelectNative component.
Select to SelectNative.locale prop to the native HTML lang prop.disabled prop to aria-disabled.twoLined prop to isTwoLined.theme prop to the className prop. If it cannot, deletes the theme prop.fluid prop, which has been deprecated.For example:
import { Select } from '@americanexpress/dls-react6';
export default function Page() {
return (
<>
<Label htmlFor="select-1">Select 1</Label>
<Select
id="select-1"
locale="en-US"
disabled={isDisabled}
twoLined={isTwoLined}
fluid={isFluid}
{...otherProps}
>
{/** Children */}
</Select>
</>
);
}
Transforms into:
import { SelectNative } from '@americanexpress/dls-react';
export default function Page() {
return (
<>
<Label htmlFor="select-1">Select 1</Label>
<SelectNative
id="select-1"
lang="en-US"
aria-disabled={isDisabled}
isTwoLined={isTwoLined}
{...otherProps}
>
{/** Children */}
</SelectNative>
</>
);
}
There are new props for handling the label associated with a Select. Move the text contents of the associated Label component to the label prop of the NativeSelect component.
Connect with the DLS Team on Slack or by email.
Check out additional resources.