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 Alert component to a v7 ComponentLevelNotification component.
Alert to ComponentLevelNotification.showStateIcon prop to showIcon.theme prop to the className prop. If it cannot, deletes the theme prop.For example:
import { Alert } from '@americanexpress/dls-react6';
export default function Page() {
return (
<Alert showStateIcon={false} {...otherProps}>
Text
</Alert>
);
}
Transforms into:
import { ComponentLevelNotification } from '@americanexpress/dls-react';
export default function Page() {
return (
<ComponentLevelNotification showIcon={false} {...otherProps}>
Text
</ComponentLevelNotification>
);
}
In v6, role gets its value based on the aria-live value. If aria-live is assertive, then role is alert. Otherwise, it has no role.
In v7, the role is a prop, and the role is derived from the role prop, if available. Otherwise, it derives the role
from the aria-live.
Connect with the DLS Team on Slack or by email.
Check out additional resources.