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 CollapsiblePanel component to a v7 AccordionPanel component.
CollapsiblePanel to AccordionPanel.theme prop to the className prop. If it cannot, deletes the theme prop.children into a heading element and places that in the heading prop.headingLevel prop. Use the heading prop instead.For example:
import { CollapsiblePanel } from '@americanexpress/dls-react6';
export default function Page() {
return (
<CollapsiblePanel id="collapsible-p-h1" icon={<IconHotel />} {...otherProps}>
Hotel
</CollapsiblePanel>
)
Transforms into:
import { AccordionPanel } from '@americanexpress/dls-react';
export default function Page() {
return (
<AccordionPanel
id="collapsible-p-h1"
icon={<IconHotel />}
heading={<h3>Hotel</h3>}
{...otherProps}
/>
);
}
Use the heading prop to pass a heading element directly to the AccordionPanel. Use the subtext prop for any additional information displayed below.
Connect with the DLS Team on Slack or by email.
Check out additional resources.