Skip to Content
DocsTheme Tokens

UI Kit tokens

UI Kit tokens are the semantic layer of the UI Kit system, providing consistent, and themeable values for UI development. They ensure design integrity, maintainability, and seamless alignment between design and implementation.

Note

Think of UI Kit tokens as the handshake between design and development. They keep everyone on the same page - so always use them to ensure things stay consistent and clean.

UI Kit tokens can be accessed through the theme object:

import { theme } from "@hitachivantara/uikit-react-core"; const MyComponent = () => ( <div style={{ color: theme.colors.primary }}> This text uses the semantic primary color. </div> );

These tokens are categorized into several groups, each serving a specific purpose in the UI Kit design system and can be accessed through the theme object.

When creating a new theme, you can extend any of the supported themes by overriding these tokens (or adding new ones). This allows you to customize the UI Kit to fit your brand or application needs while maintaining the core design principles.

Note

Check the Color tokens page for more information on how to use color tokens in your components.

Below is a summary of the available token categories:

Radii

Accessible through the theme.radii object, these tokens define the border radius values used across the UI Kit components.

none
0px
base
4px
round
8px
large
16px
full
9999px

Spacing

Accessible through the theme.spacing object, these tokens define the spacing values used for margins, paddings, and gaps in the UI Kit components.

base
8
xxs
4px
xs
8px
sm
16px
md
24px
lg
48px
xl
80px

ZIndex

Accessible through the theme.zIndex object, these tokens define the stacking order of UI Kit components.

hide
-1
base
0
docked
10
sticky
1000
fab
1050
banner
1100
overlay
1200
modal
1300
dropdown
1400
popover
1500
tooltip
1600
skipLink
1700
toast
1800

Typography

These tokens define the typography styles used in the UI Kit components.

fontFamily

UI Kitbody
Inter, Arial, Helvetica, sans-serif

fontSizes

UI Kitxs
10px
UI Kitsm
12px
UI Kitbase
14px
UI Kitlg
16px
UI Kitxl
20px
UI Kitxl2
24px
UI Kitxl3
32px
UI Kitxl4
42px

fontWeights

UI Kithairline
100
UI Kitthin
200
UI Kitlight
300
UI Kitnormal
400
UI Kitmedium
500
UI Kitsemibold
600
UI Kitbold
700
UI Kitextrabold
800
UI Kitblack
900

lineHeights

UI Kitnone
21px
UI Kitxs
16px
UI Kitsm
18px
UI Kitbase
21px
UI Kitlg
24px
UI Kitxl
30px
UI Kitxl2
36px
UI Kitxl3
48px
UI Kitxl4
63px

Breakpoints

Accessible through the theme.breakpoints object, these tokens define the responsive breakpoints used in the UI Kit components.

xs
0px
sm
600px
md
960px
lg
1270px
xl
1920px
Last updated on