Design tokens enable easy theming for all BlueprintUI components. The base theme and additional built in themes are defined in the @blueprintui/themes
package. BlueprintUI Themes can be used standalone of other BlueprintUI components and utilities.
Installation
npm install @blueprintui/themes
@import '@blueprintui/themes/index.min.css'; // light
@import '@blueprintui/themes/dark/index.min.css'; // dark
@import '@blueprintui/themes/compact/index.min.css'; // compact
To enable the tokens and addon themes add the bp-theme
attribute to the root HTML element.
<html bp-theme="">
Color
TokenValueExample--bp-color-scheme
normal--bp-color-black
hsl(0, 0%, 0%)--bp-color-white
hsl(0, 0%, 100%)--bp-color-yellow-100
oklch(from var(--bp-color-yellow-0) 0.98 0.05 h)--bp-color-yellow-200
oklch(from var(--bp-color-yellow-0) 0.95 0.1 h)--bp-color-yellow-300
oklch(from var(--bp-color-yellow-0) 0.9 0.15 h)--bp-color-yellow-400
oklch(from var(--bp-color-yellow-0) 0.85 c h)--bp-color-yellow-500
oklch(from var(--bp-color-yellow-0) 0.8 c h)--bp-color-yellow-600
oklch(from var(--bp-color-yellow-0) 0.75 c h)--bp-color-yellow-700
oklch(from var(--bp-color-yellow-0) 0.6 c h)--bp-color-yellow-800
oklch(from var(--bp-color-yellow-0) 0.5 c h)--bp-color-yellow-900
oklch(from var(--bp-color-yellow-0) 0.4 c h)--bp-color-yellow-1000
oklch(from var(--bp-color-yellow-0) 0.2 c h)--bp-color-violet-100
oklch(from var(--bp-color-violet-0) 0.95 0.05 h)--bp-color-violet-200
oklch(from var(--bp-color-violet-0) 0.9 0.1 h)--bp-color-violet-300
oklch(from var(--bp-color-violet-0) 0.8 0.15 h)--bp-color-violet-400
oklch(from var(--bp-color-violet-0) 0.7 c h)--bp-color-violet-500
oklch(from var(--bp-color-violet-0) 0.6 c h)--bp-color-violet-600
oklch(from var(--bp-color-violet-0) 0.5 c h)--bp-color-violet-700
oklch(from var(--bp-color-violet-0) 0.4 c h)--bp-color-violet-800
oklch(from var(--bp-color-violet-0) 0.3 c h)--bp-color-violet-900
oklch(from var(--bp-color-violet-0) 0.2 c h)--bp-color-violet-1000
oklch(from var(--bp-color-violet-0) 0.1 c h)--bp-color-blue-100
oklch(from var(--bp-color-blue-0) 0.95 0.05 h)--bp-color-blue-200
oklch(from var(--bp-color-blue-0) 0.9 0.1 h)--bp-color-blue-300
oklch(from var(--bp-color-blue-0) 0.8 0.15 h)--bp-color-blue-400
oklch(from var(--bp-color-blue-0) 0.7 c h)--bp-color-blue-500
oklch(from var(--bp-color-blue-0) 0.6 c h)--bp-color-blue-600
oklch(from var(--bp-color-blue-0) 0.5 c h)--bp-color-blue-700
oklch(from var(--bp-color-blue-0) 0.4 c h)--bp-color-blue-800
oklch(from var(--bp-color-blue-0) 0.3 c h)--bp-color-blue-900
oklch(from var(--bp-color-blue-0) 0.2 c h)--bp-color-blue-1000
oklch(from var(--bp-color-blue-0) 0.1 c h)--bp-color-green-100
oklch(from var(--bp-color-green-0) 0.95 0.05 h)--bp-color-green-200
oklch(from var(--bp-color-green-0) 0.9 0.1 h)--bp-color-green-300
oklch(from var(--bp-color-green-0) 0.8 0.15 h)--bp-color-green-400
oklch(from var(--bp-color-green-0) 0.7 c h)--bp-color-green-500
oklch(from var(--bp-color-green-0) 0.6 c h)--bp-color-green-600
oklch(from var(--bp-color-green-0) 0.5 c h)--bp-color-green-700
oklch(from var(--bp-color-green-0) 0.4 c h)--bp-color-green-800
oklch(from var(--bp-color-green-0) 0.3 c h)--bp-color-green-900
oklch(from var(--bp-color-green-0) 0.2 c h)--bp-color-green-1000
oklch(from var(--bp-color-green-0) 0.1 c h)--bp-color-red-100
oklch(from var(--bp-color-red-0) 0.98 c h)--bp-color-red-200
oklch(from var(--bp-color-red-0) 0.95 c h)--bp-color-red-300
oklch(from var(--bp-color-red-0) 0.9 c h)--bp-color-red-400
oklch(from var(--bp-color-red-0) 0.8 c h)--bp-color-red-500
oklch(from var(--bp-color-red-0) 0.7 c h)--bp-color-red-600
oklch(from var(--bp-color-red-0) 0.59 c h)--bp-color-red-700
oklch(from var(--bp-color-red-0) 0.5 c h)--bp-color-red-800
oklch(from var(--bp-color-red-0) 0.4 c h)--bp-color-red-900
oklch(from var(--bp-color-red-0) 0.3 c h)--bp-color-red-1000
oklch(from var(--bp-color-red-0) 0.2 c h)--bp-color-gray-100
oklch(from var(--bp-color-gray-0) 0.95 0.008 h)--bp-color-gray-200
oklch(from var(--bp-color-gray-0) 0.9 0.01 h)--bp-color-gray-300
oklch(from var(--bp-color-gray-0) 0.8 c h)--bp-color-gray-400
oklch(from var(--bp-color-gray-0) 0.65 c h)--bp-color-gray-500
oklch(from var(--bp-color-gray-0) 0.5 c h)--bp-color-gray-600
oklch(from var(--bp-color-gray-0) 0.4 c h)--bp-color-gray-700
oklch(from var(--bp-color-gray-0) 0.3 c h)--bp-color-gray-800
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-color-gray-900
oklch(from var(--bp-color-gray-0) 0.2 0.01 h)--bp-color-gray-1000
oklch(from var(--bp-color-gray-0) 0.15 0.01 h)Status
TokenValueExample--bp-status-accent-background-100
oklch(from var(--bp-color-blue-0) 0.9 0.1 h)--bp-status-accent-background-200
oklch(from var(--bp-color-blue-0) 0.5 c h)--bp-status-accent-background-300
oklch(from var(--bp-color-blue-0) 0.4 c h)--bp-status-accent-color-100
hsl(0, 0%, 100%)--bp-status-success-background-100
oklch(from var(--bp-color-green-0) 0.9 0.1 h)--bp-status-success-background-200
oklch(from var(--bp-color-green-0) 0.5 c h)--bp-status-success-background-300
oklch(from var(--bp-color-green-0) 0.4 c h)--bp-status-success-color-100
hsl(0, 0%, 100%)--bp-status-warning-background-100
oklch(from var(--bp-color-yellow-0) 0.95 0.1 h)--bp-status-warning-background-200
oklch(from var(--bp-color-yellow-0) 0.75 c h)--bp-status-warning-background-300
oklch(from var(--bp-color-yellow-0) 0.6 c h)--bp-status-warning-color-100
hsl(0, 0%, 0%)--bp-status-danger-background-100
oklch(from var(--bp-color-red-0) 0.95 c h)--bp-status-danger-background-200
oklch(from var(--bp-color-red-0) 0.59 c h)--bp-status-danger-background-300
oklch(from var(--bp-color-red-0) 0.5 c h)--bp-status-danger-color-100
hsl(0, 0%, 100%)--bp-status-neutral-background-100
oklch(from var(--bp-color-gray-0) 0.9 0.01 h)--bp-status-neutral-background-200
oklch(from var(--bp-color-gray-0) 0.4 c h)--bp-status-neutral-background-300
oklch(from var(--bp-color-gray-0) 0.3 c h)--bp-status-neutral-color-100
hsl(0, 0%, 100%)--bp-status-disabled-background-100
oklch(from var(--bp-color-gray-0) 0.8 c h)--bp-status-disabled-background-200
oklch(from var(--bp-color-gray-0) 0.65 c h)--bp-status-disabled-background-300
oklch(from var(--bp-color-gray-0) 0.5 c h)--bp-status-disabled-color-100
oklch(from var(--bp-color-gray-0) 0.4 c h)Object
TokenValueExample--bp-object-border-radius-100
4px--bp-object-border-radius-200
24px--bp-object-border-radius-300
50%--bp-object-border-width-100
1px--bp-object-border-width-200
2px--bp-object-border-width-300
4px--bp-object-border-color-100
oklch(from var(--bp-color-gray-0) 0.9 0.01 h)--bp-object-border-color-200
oklch(from var(--bp-color-gray-0) 0.8 c h)--bp-object-border-color-300
oklch(from var(--bp-color-gray-0) 0.65 c h)--bp-object-shadow-100
0 2px 2px hsla(0, 0%, 0%, 0.2)--bp-object-shadow-200
0 3px 4px hsla(0, 0%, 0%, 0.2)--bp-object-shadow-300
0 4px 6px hsla(0, 0%, 0%, 0.2)--bp-object-opacity-100
hsla(222, 7%, 46%, 0)--bp-object-opacity-200
hsla(222, 7%, 46%, 0.1)--bp-object-opacity-300
hsla(222, 7%, 46%, 0.4)--bp-object-opacity-400
hsla(222, 7%, 46%, 0.6)Layer
TokenValueExample--bp-layer-@
100100--bp-layer-background-100
oklch(from var(--bp-color-gray-0) 0.95 0.008 h)--bp-layer-background-200
hsl(0, 0%, 100%)--bp-layer-background-300
oklch(from var(--bp-color-gray-0) 0.95 0.008 h)--bp-layer-background-400
oklch(from var(--bp-color-gray-0) 0.2 0.01 h)--bp-layer-header-color
hsl(0, 0%, 100%)--bp-layer-header-background
oklch(from var(--bp-color-gray-0) 0.3 c h)Interaction
TokenValueExample--bp-interaction-outline
Highlight solid 2pxHighlight solid 2px--bp-interaction-outline-webkit
5px auto -webkit-focus-ring-color5px auto -webkit-focus-ring-color--bp-interaction-outline-offset
2px2px--bp-interaction-touch-target
36px36px--bp-interaction-highlight-background
hsla(211, 100%, 88%, 0.25)--bp-interaction-accent-background
oklch(from var(--bp-color-blue-0) 0.5 c h)--bp-interaction-default-offset
0%0%--bp-interaction-default-color
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-interaction-hover-offset
3.5%3.5%--bp-interaction-hover-color
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-interaction-focused-offset
0%0%--bp-interaction-focused-color
oklch(from var(--bp-color-gray-0) 0.3 c h)--bp-interaction-active-offset
7%7%--bp-interaction-active-color
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-interaction-selected-offset
3%3%--bp-interaction-selected-color
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-interaction-disabled-offset
10%10%--bp-interaction-disabled-color
oklch(from var(--bp-color-gray-0) 0.65 c h)Scale
TokenValueExample--bp-scale-size
11--bp-scale-space
11--bp-scale-text
11Text
TokenValueExample--bp-text-color-100
hsl(0, 0%, 100%)--bp-text-color-200
oklch(from var(--bp-color-gray-0) 0.95 0.008 h)--bp-text-color-300
oklch(from var(--bp-color-gray-0) 0.65 c h)--bp-text-color-400
oklch(from var(--bp-color-gray-0) 0.4 c h)--bp-text-color-500
oklch(from var(--bp-color-gray-0) 0.25 c h)--bp-text-color-600
hsl(0, 0%, 0%)--bp-text-weight-light
300300
--bp-text-weight-regular
400400
--bp-text-weight-medium
500500
--bp-text-weight-semibold
500500
--bp-text-weight-bold
600600
--bp-text-weight-extrabold
600600
--bp-text-size-100
12px12px
--bp-text-size-200
14px14px
--bp-text-size-300
16px16px
--bp-text-size-400
20px20px
--bp-text-size-500
24px24px
--bp-text-size-600
32px32px
--bp-text-size-700
36px36px
--bp-text-size-800
48px48px
--bp-text-font
'system-ui', 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif'system-ui', 'Avenir Next', 'Helvetica Neue', Helvetica, Arial, sans-serif--bp-text-monospaceFont
'ui-monospace', Consolas, Menlo, Monaco, monospaceLayout
TokenValueExample--bp-layout-grid-cols
1212--bp-layout-width-xs
576px576px--bp-layout-width-sm
768px768px--bp-layout-width-md
1024px1024px--bp-layout-width-lg
1200px1200px--bp-layout-width-xl
1440px1440pxSize
TokenValueExample--bp-size-100
1px--bp-size-200
2px--bp-size-300
4px--bp-size-400
8px--bp-size-500
12px--bp-size-600
16px--bp-size-700
24px--bp-size-800
32px--bp-size-900
48px--bp-size-1000
64px--bp-size-1100
72px--bp-size-1200
96pxSpace
TokenValueExample--bp-space-xs
8px--bp-space-sm
16px--bp-space-md
24px--bp-space-lg
48px--bp-space-xl
64px