The Design Language System (DLS) is a set of style and code implementation guidelines, UI design kit, UI front end components libraries, iconography, flags collection and other visual assets, to help digital teams at American Express deliver a blue box experience to our customers in a scalable way.
The DLS adheres to brand guidelines, accessibility standards, cross browsing compatibilities, modular, design forward and systematic approach to all its elements and components.
With these benefits in mind, try and use the DLS as much as possible and be very conscious about deviation or modification – Developers shouldn’t lightly accept a design that might contradict or doesn’t utilize the DLS.
Find us on Slack and via email.
Before reaching out, please:
When reaching out, please:
We welcome contributions. Before contributing be sure to visit our contribution section of this site. It’s also important to read the CONTRIBUTING.md file for the repository you are contributing to.
DLS Repo - https://github.aexp.com/amex-eng/axp-dls
Asset Repo - https://github.aexp.com/amex-eng/axp-static-assets
DLS React Repo - https://github.aexp.com/amex-eng/axp-dls-react
There are a few ways to start using the DLS. You can either: Download the library in zipped format; reference the CDN; or install the DLS using Node Package Manager (NPM).
React developers can take advantage of dls-react, a library of DLS React components.
External? Please get in touch with us at DLS@aexp.com for installation steps and access.
Install dls-react using NPM by running the following commands in your terminal:
# Set up the Amex proxy.Visit the DLS React Docs
export HTTP_PROXY=http://proxy.aexp.com:8080
export HTTPS_PROXY=http://proxy.aexp.com:8080
export NO_PROXY=.aexp.com
# Use the internal npm repository.
npm config set registry https://artifactory.aexp.com/api/npm/npm-virtual
# Install dls-react in your project.
npm install @americanexpress/dls-react
A DLS stylesheet should be used with dls-react. To make sure a DLS stylesheet is included your application, a Helmet component <DefaultStyle /> is available to check if a DLS stylesheet is present and to include dls-mini at the <head> of the application if not. DLS Mini is a light-weight DLS stylesheet that only provides the global essentials such as style resets, typography, and basic layout.
One Amex developers should reference one-dev to see how DLS is included in modules.
In the index HTML page of your project, include the Design Language System CSS and JavaScript files (optional if your application is using a library or framework with its own functionality).
Load CSS, JS, and images remotely without the need to install local copies of the files. Just add the following
<link>and
<script>elements into your HTML pages. The
<script>tag must be included at the bottom of your root html file in order for the JS to work properly:
<link rel="stylesheet" href="https://www.aexp-static.com/cdaas/one/statics/@americanexpress/dls/6.25.6/package/dist/6.25.6/styles/dls.min.css">
<script type="text/javascript" src="https://www.aexp-static.com/cdaas/one/statics/@americanexpress/dls/6.25.6/package/dist/6.25.6/scripts/dls.min.js"></script>
Install DLS using NPM by running the following commands in your terminal:
# Set up the Amex proxy.
export HTTP_PROXY=http://proxy.aexp.com:8080
export HTTPS_PROXY=http://proxy.aexp.com:8080
export NO_PROXY=.aexp.com
# Use the internal npm repository.
npm config set registry https://artifactory.aexp.com/api/npm/npm-virtual
# Install axp-dls in your project.
npm install @americanexpress/dls
You’ll find the Design Language System’s compiled styles and scripts in the dist folder. Update the path reference as needed by your project.
Refer to these files by adding a
<link>and
<script>elements into your HTML pages:
<link rel="stylesheet" href="./dist/6.25.6/styles/dls.min.css">
<script type="text/javascript" src="./dist/6.25.6/scripts/dls.min.js"></script>
Download the minified CSS and JavaScript locally. This option should be for third-party agencies who do not have access to the American Express network.
Download DLS v6.25.6Refer to these files by adding a
<link>and
<script>elements into your HTML pages:
<link rel="stylesheet" href="./dist/6.25.6/styles/dls.min.css">
<script type="text/javascript" src="./dist/6.25.6/scripts/dls.min.js"></script>
Note: One of the following lines must be added to the page for icons to work correctly.
<meta charset="utf-8"><%@ page contentType="text/html; charset=UTF-8" %>You should reference the files in the dist folder:
@americanexpress/dls
└── dist
└── {version}
├── css
├── scripts
└── styles
CSS
CSS Modules for globals, utilities, and components.
Styles
Compiled and minified CSS files to include in your application. Also includes DLS Lite and DLS Mini.
Scripts
Compiled and minified JavaScript files. Optional if your application is using a library or framework with its own functionality. If you are using dls.js, you can apply functionality using data-toggle={component} and applicable data-attributes specified in the guideline examples. Otherwise, you can exclude data-attributes.
If you’re using React, check out our React components library dls-react.
<!doctype html>
<html lang="en">
<head>
<title>American Express</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link type="text/css" rel="stylesheet" href="https://www.aexp-static.com/cdaas/one/statics/@americanexpress/dls/6.25.6/package/dist/6.25.6/styles/dls.css" media="all">
</head>
<body>
...
<script type="text/javascript" src="https://www.aexp-static.com/cdaas/one/statics/@americanexpress/dls/6.25.6/package/dist/6.25.6/scripts/dls.js"></script>
</body>
</html>
</div>
dls.js
dls.js offers basic functionality in vanilla JavaScript and is included in the full DLS library. To use dls.js, include it in a <script> tag at the bottom of your HTML. Apply functionality to a component using data-toggle={component} and the applicable data-attributes specified in the component’s coded examples.
Depending on your application setup, you may need to call DLS.render() or
window.DLS = new DLSApp();
window.DLS.render();
to initiate the DLS scripts.
If you are not using dls.js, you can exclude data-attributes from your code. Data-attributes are only used for dls.js.
Visual assets are hosted in a central internal repository for reference at axp-static-assets. This includes card art, flags, logos, social icons, icon and glyph svgs, iconfonts, and fonts.
While this repo is not accessible to external teams, assets can be used by referencing the hosted CDN source listed below:
https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/{version}/package/dist/{path/to/asset}
Asset files available in @americanexpress/static-assets dist folder:
See the Graphics and Logos section for path references to cards, badges, flags, and other branding assets.
Example - AU Flag
<img src=“https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/2.28.0/package/dist/img/flags/dls-flag-au.svg” />
Icon and glyph CDN files are named after their classnames and come in pdf, png, and svg:
Example - Icon
<img src=“https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/2.28.0/package/dist/img/icons/dls-icon-account.svg” />
<img src=“https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/2.28.0/package/dist/img/icons/dls-icon-account.png” />
<img src=“https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/2.28.0/package/dist/img/icons/dls-icon-account.pdf” />
Font files for Guardian and Amex22 card text are hosted in the CDN as well, however there is no need to reference them directly as they are included by default with DLS and DLS-lite css.
The DLS is a common resource used by different teams on various platforms and frameworks.
As usage expands and each application pulls in its own version of the DLS, shared assets can operate across multiple applications and multiple versions of the DLS using CSS Modules.
The DLS has a variety of styles and classes available for different components, but not all applications or platforms require all available DLS components. DLS Lite is a lightweight version of the style library that provides only the basics, such as typography, utilities, and color. It only includes CSS and not JS. Additional styles and classes can be be pulled in with CSS modules as needed. DLS Lite is available in the dist/{version}/styles folder.
DLS Lite includes:
DLS Mini is an even smaller version of DLS Lite that only provides the global essentials such as style resets, typography, and basic layout. DLS Mini is available in the dist/{version}/styles folder.
DLS Mini includes:
CSS modules create unique, dynamic class names for each locally defined style. CSS modules should be used for components that need unique classnames so that they aren’t affected by different versions of the DLS or other styles from different applications. Examples include navigation, footer, login widgets, and anything shared across tenancy or outside the company.
All DLS components, globals, and utilities are compiled into their own CSS file within the dist/css folder. These can be referenced and used as CSS classes or exported as objects. CSS modules should be used in combination with DLS Lite.
Major differences to note:
.col classAdd DLS Lite and the relevant CSS modules as style sheet references.
<link type="text/css" rel="stylesheet" href="@americanexpress/dls/dist/6.25.6/styles/dls-lite.css" media="all">
<link type="text/css" rel="stylesheet" href="@americanexpress/dls/dist/css/alert.css" media="all">
<link type="text/css" rel="stylesheet" href="@americanexpress/dls/dist/css/forms.css" media="all">
<link type="text/css" rel="stylesheet" href="@americanexpress/dls/dist/css/padResponsive.css" media="all">
<div class="border dls-white-bg">
<form class="formHasWarning">
<div class="padResponsive alert dls-red" role="alert">
<span class="icon dls-icon-warning-filled margin-1-r"></span>
<span>Your User ID or Password is incorrect.<br />Please try again.</span>
</div>
<hr>
<div class="padResponsive stack">
<div>
<label for="eg1-user">User ID</label>
<input type="text" id="eg1-user" class="formControl" value="char•••••" />
</div>
<div>
<label for="eg1-pass">Password</label>
<input type="password" id="eg1-pass" class="formControl" />
</div>
<div>
<button type="submit" id="dls-example-login-button" class="btn fluid margin-auto-lr">Log In</button>
</div>
</div>
</form>
</div>
Import the CSS object or camelCased classnames and use them as variables.
// Component.jsx
import { card } from '../../../../@americanexpress/dls/dist/css/card.css';
import { dlsColorAccentGray01 } from '../../../../@americanexpress/dls/dist/css/colors.css';
import { pad3t, padB } from '../../../../@americanexpress/dls/dist/css/padStatic.css';
import marginStatic from '../../../../@americanexpress/dls/dist/css/marginStatic.css';
import grid from '../../../../@americanexpress/dls/dist/css/grid.css';
...
return (
<section className={`${card} ${marginStatic.marginT}`}>
<div className={grid.row}>
<div className={`${grid.colMd12} ${pad3t} ${padB}`}>
<div className={dlsColorAccentGray01}>
...
</div>
</div>
</div>
</section>
)
@americanexpress/dls
└── dist
└── {version}
└── css
├── accentBar.css
├── accessibility.css
├── actionGroup.css
├── alert.css
├── alignment.css
├── animBar.css
├── animDelay.css
├── animFade.css
├── animSlide.css
├── animSpin.css
├── appBadge.css
├── badge.css
├── barChart.css
├── borders.css
├── breadcrumb.css
├── btn.css
├── btnChevron.css
├── btnCircle.css
├── btnCobrand.css
├── btnFloat.css
├── btnFloatingChat.css
├── btnFloatingScroll.css
├── btnGroup.css
├── btnIcon.css
├── btnLoading.css
├── btnTooltip.css
├── card.css
├── cardActionable.css
├── cardImg.css
├── caret.css
├── carousel.css
├── checkbox.css
├── checklist.css
├── collapsible.css
├── colors.css
├── colorsCard.css
├── colorsCobrand.css
├── colorsData.css
├── colorsDataVisualization.css
├── colorsDls.css
├── colorsFico.css
├── colorsFilter.css
├── colorsOffers.css
├── colorsTrend.css
├── copy.css
├── currency.css
├── datePicker.css
├── display.css
├── displayRanges.css
├── dlsCard.css
├── dlsCardField.css
├── dlsCardTilt.css
├── elements.css
├── fileUpload.css
├── filter.css
├── flag.css
├── flex.css
├── float.css
├── focus.css
├── focusRanges.css
├── fonts.css
├── forms.css
├── gradients.css
├── grid.css
├── gridAlignment.css
├── gridLayout.css
├── hero.css
├── hint.css
├── iconography.css
├── imagephoto.css
├── inputStatus.css
├── layout.css
├── list.css
├── logo.css
├── marginRanges.css
├── marginResponsive.css
├── marginStatic.css
├── modal.css
├── multiselect.css
├── nav.css
├── navAccordion.css
├── navDropdown.css
├── navFooter.css
├── navHorizontal.css
├── navVertical.css
├── overflowMenu.css
├── padRanges.css
├── padResponsive.css
├── padStatic.css
├── pagination.css
├── phone.css
├── position.css
├── progress.css
├── progressBar.css
├── progressCircle.css
├── progressLinear.css
├── progressMultiStep.css
├── pull.css
├── radio.css
├── required.css
├── scroll.css
├── search.css
├── searchfield.css
├── select.css
├── sizing.css
├── slider.css
├── smartField.css
├── smsfield.css
├── stepper.css
├── switches.css
├── table.css
├── tabs.css
├── tags.css
├── text.css
├── tooltip.css
├── typography.css
├── video.css
└── visibility.css
This badge indicates that the component is outdated and will be removed in the next major release*. If you see this badge next to a component in the library, use of component should be discontinued. Please reference the Changelog and Release Notes for details and alternatives.
*Releases follow the semver pattern: MAJOR.MINOR.PATCH
DLS CDN - https://www.aexp-static.com/cdaas/one/statics/@americanexpress/dls/{version}/package/dist/{version}/{styles/scripts}/{dls.min.css/dls.min.js}
Asset CDN - https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/{version}/package/{path/to/asset}
One Amex CTP learning sessions are hosted once a month and there are some DLS-related trainings such as:
This guide only shows major changes that affect end users. For more details please see the Changelog.
DLS v6.0.0 is all about accessibility and cleanup.
We’ve refactored the current codebase to reduce its size and remove many of the duplicative CSS classes. We’ve also refactored components and examples to meet accessibility best practices. We’ve placed all visual assets into a central repository with a CDN as a single point of reference (icons, glyphs, logos, flags, etc).
CSS - Classes that are redundant and could be replaced with other existing classes have been removed.
JS - All scripts were re-written to be simplified and more dynamic. Data-attributes are only used for dls.js functionality.
Markup - Components and examples were refactored to be semantically correct and accessible.
Central Asset Repository - We’ve separated all visual assets into a central point of reference at axp-static-assets to facilitate re-use of the most common assets. This includes images, icons, and fonts.
Path Reference - Path reference to styles and scripts have changed from dist/* to dist/{version}/*` for caching.
Below is a list of components that have been refactored with major breaking changes. Check out the coded examples of each component provided in our guidelines and update your code accordingly. See Changelog for details.
<button> element for other components that are semantic buttons but that don’t look like .btn (add .btn to all visual buttons).label-* classes, removed .legalaxp-static-assets acts as a central asset repository with CDN reference:
https://www.aexp-static.com/cdaas/one/statics/axp-static-assets/{version}/package/dist/{path/to/asset}
Use the CDN path reference for logos, flags, and cards.
Example - AU Flag
<img src=“https://www.aexp-static.com/cdaas/one/statics/@americanexpress/static-assets/2.28.0/package/dist/img/flags/dls-flag-au.svg” />