DÁP design system components can be styled via design tokens. The package provides a set of predefined themes that can be used to style the components.
The design system includes three core themes with different visual modes:
light- Default light theme with indigo brand colordark- Dark mode varianthigh-contrast- High contrast accessibility themeoklch- OKLCH color space variant, supports P3/wide-gamut displays, this is has the same visual mode as thelighttheme, but uses the OKLCH color space for the color values
In addition to the core themes, the design system provides four color palette variants that use different brand colors:
teal- Teal brand color (#027671)cold-grey- Cold grey brand color (#606b7a)azure- Azure brand color (#01719d)violet- Violet brand color (#8445db)
These color variants provide alternative brand color options while maintaining the same semantic color system for states (informative, positive, warning, negative).
The DÁP Design System uses a 3-tier token inheritance structure to provide flexibility and maintainability. This architecture allows themes to be created by simply remapping brand tokens to different foundation palettes, while all component tokens automatically inherit the new colors.
indigo.100#f1f3ffindigo.800#647affindigo.1000#4258edcold grey.1000#606b7asemantic green.1000#00ac5asemantic red.1000#dd0041white.100#ffffffbrand.100{indigo.100}{indigo.100} → #f1f3ffbrand.800{indigo.800}{indigo.800} → #647affbrand.1000{indigo.1000}{indigo.1000} → #4258edneutral.1000{cold grey.1000}{cold grey.1000} → #606b7apositive.1000{semantic green.1000}{semantic green.1000} → #00ac5anegative.1000{semantic red.1000}{semantic red.1000} → #dd0041focus.outer-ring{brand.800}{brand.800} → {indigo.800} → #647afffocus.inner-ring{white.100}{white.100} → #ffffffbutton-primary.background.enabled{brand.1000}{brand.1000} → {indigo.1000} → #4258edbackground.neutral.subtle{white.100}{white.100} → #fffffftext.positive.base{positive.1000}{positive.1000} → {semantic green.1000} → #00ac5atext.negative.base{negative.1000}{negative.1000} → {semantic red.1000} → #dd0041This 3-tier architecture allows themes to be created by simply remapping Tier 2 tokens to different foundation palettes. For example, the teal theme changes brand.* to reference the teal palette instead of indigo, while all component tokens automatically inherit the new colors.
💡 Tip: Click any token name to copy it to your clipboard. Click tier headers to expand and see examples.
These are simple CSS files with all the CSS variables defined for the components. You can import these files in your project and use the variables to style the components.
The default theme is the light theme. These variables exist in the :root block of the stylesheet.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/light.theme.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/dark.theme.css" />
<!-- Teal variant -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/teal.theme.css" />
<!-- Cold Grey variant -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/cold-grey.theme.css" />
<!-- Azure variant -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/azure.theme.css" />
<!-- Violet variant -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/violet.theme.css" />
It is important that the dark-theme and high-contrast themes are scoped to the .dark-theme and .high-contrast-theme classes respectively. This is to ensure that the themes are applied only to the components that are wrapped in the respective classes.
The easiest way to apply the dark or high-contrast theme is to add the dark-theme or high-contrast-theme class to the body tag of your application.
<body class="dark-theme">
Color variant themes (teal, cold-grey, azure, violet) use the :root selector similar to the light theme, so they can be imported directly without additional scoping.
These files are minified and can be imported directly from the CDN. You can also download the files from the dist folder in the package and import them in your project.
If you want to customize the themes, you can create your own CSS file and override the variables defined in the default themes.
The unminified versions of the themes are available in the dist/variables folder in the package. You can use these files as a reference to create your own custom themes.