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 Tag component to a v7 Tag component.
dismissible prop to isDismissible.onDismiss prop to onClick.label prop to labelOverrides.dismissScreenReaderLabel.inline prop, which has been deprecated.theme prop to the className prop. If it cannot, deletes the theme prop.For example:
import { Tag } from '@americanexpress/dls-react6';
export default function Page() {
return (
<Tag
inline={inline}
dismissible={dismissible}
label="Click to dismiss"
onDismiss={onDismiss}
theme={{ color: 'red' }}
{...otherProps}
>
Tag Text
</Tag>
);
}
Transforms into:
import { Tag } from '@americanexpress/dls-react';
export default function Page() {
return (
<Tag
isDismissible={dismissible}
onClick={onDismiss}
{...otherProps}
labelOverrides={{
dismissScreenReaderLabel: 'Click to dismiss',
}}
>
Tag Text
</Tag>
);
}
Note that in v7, the default Tag component (in other words, if isDismissible={false}) can be toggled. Please verify that this behavior works within the context of your application.
Connect with the DLS Team on Slack or by email.
Check out additional resources.