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 FilterMenu component to a v7 FilterMenu component.
theme prop to the className prop. If it cannot, deletes the theme prop.filtersApplied prop to filtersAppliedCount.onClose prop to onMenuClose.onCloseClick prop to onCloseButtonClick.filterButtonLabel prop to labelOverrides.filterButtonScreenReaderLabel.filtersLabel prop to labelOverrides.menuHeadingLabel.closeButtonLabel prop to labelOverrides.closeButtonScreenReaderLabel.resetButtonLabel prop to labelOverrides.resetButtonLabel.applyButtonLabel prop to labelOverrides.applyButtonLabel.For example:
import { FilterMenu } from '@americanexpress/dls-react6';
export default function Page() {
return (
<FilterMenu
filtersApplied={1}
onClose={() => {}}
onCloseClick={() => {}}
filterButtonLabel="Open filter menu"
filtersLabel="Filters"
closeButtonLabel="Close"
resetButtonLabel="Reset"
applyButtonLabel="Apply"
theme={{ color: 'red' }}
{...otherProps}
>
{/** Children */}
</FilterMenu>
);
}
Transforms into:
import { FilterMenu } from '@americanexpress/dls-react';
export default function Page() {
return (
<FilterMenu
filtersAppliedCount={1}
onMenuClose={() => {}}
onCloseButtonClick={() => {}}
labelOverrides={{
filterButtonScreenReaderLabel: 'Open filter menu',
menuHeadingLabel: 'Filters',
closeButtonScreenReaderLabel: 'Close',
resetButtonLabel: 'Reset',
applyButtonLabel: 'Apply',
}}
{...otherProps}
>
{/** Children */}
</FilterMenu>
);
}
Connect with the DLS Team on Slack or by email.
Check out additional resources.