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 Checkbox component to a v7 Checkbox or CheckboxIndeterminate component.
describedBy prop to aria-describedby.disabled to aria-disabled.valid to aria-invalid and inverts the value.theme prop to the className prop. If it cannot, deletes the theme prop.Checkbox has indeterminate prop, renames component to CheckboxIndeterminate and renames prop to isIndeterminate.For example:
import { Checkbox } from '@americanexpress/dls-react6';
export default function Page() {
return (
<Checkbox
id="some-id"
label="My Checkbox"
disabled={isDisabled}
indeterminate={isIndeterminate}
valid={isValid}
describedBy="some-id"
theme={{ color: 'red' }}
{...otherProps}
/>
);
}
Transforms into:
import { CheckboxIndeterminate } from '@americanexpress/dls-react';
export default function Page() {
return (
<CheckboxIndeterminate
id="some-id"
label="My Checkbox"
aria-disabled={isDisabled}
aria-invalid={!isValid}
aria-describedby="some-id"
isIndeterminate={isIndeterminate}
{...otherProps}
/>
);
}
A new component, CheckboxGroup, was introduced as an accessible and consistent way of grouping a set of Checkbox and CheckboxIndeterminate components. If you are using a group of checkboxes, wrap the checkboxes in a CheckboxGroup instead of a fieldset or similar element.
Connect with the DLS Team on Slack or by email.
Check out additional resources.