Skip to content

Defining Your Theme

The components library provides a theming framework that can be used within these components and beyond on your entire site, helping to maintain a cohesive design system.

The framework acts through a number of layers, where each one feeds down into the next. Its fully customisable implementation allows you to decouple or change these connections at any point, simply by overriding the css variables within your project.

1 - site variables are at the top of the style tree, and propagate through to the lower levels. This allows you to re theme a site with only a handful of variable changes.

2 - Primitive variables are computed from site variables, such as shades of a site colour.

3 - Semantic variables apply context to the site and primitive variables. These can exist as a specified primitive, such as default, light or dark shades of a colour. THey can also exist in a broader context, where foreground, background and border styles are given as sets that can be reused throughout. Classes are also provided in these cases to improve the developer experience and promote consistent styling.

4 - Component variables are specific to each component. These are documented on each components page respectively

In order to apply your own themes on top of the base styles, simply define the variables you want to change, and they will update across your site where they are used.

Theming System Visualised

Site Variables

Site Variables

The design system is based off the following site variables. These can be overridden to change the appearance of the entire site.

Colours

--color-site-primary - The primary or brand colour


--color-site-secondary - The secondary colour


--color--site-tertiary - The tertiary colour


--color-site-neutral - The neutral tone, typically a shade of grey


--color-site-attention - The attention colour


--color-site-success - The success colour


--color-site-error - The error colour


--color-site-promotion - The promotion colour, used sparingly to highlight important information such as promotional items

Radius

--radius-site - The site radius for all rounded corners

Shadows

--shadow-site - The site shadow for all components

Colour Palette

The color scheme of a site is defined using the site variables shown below. From this, CSS calculations will generate a range of primitive shades centered around the site variable, where the site colour is 500 on a scale of 50 (lightest) to 950 (darkest). These can be individually changed by overriding their css definitions.

Semantic shades have been labeled. Default shades are provided when no suffix is given, such as --color-primary. Other semantic shades, such as ‘light’ are given by using the label as the suffix, e.g. --color-primary-light

primary

light
--color-primary-50
oklch( from var(--color-primary-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-primary-100
oklch( from var(--color-primary-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-primary-200
oklch( from var(--color-primary-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-primary-300
oklch( from var(--color-primary-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
hover-light
--color-primary-400
oklch( from var(--color-primary-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-primary-500
oklch(from var(--color-primary) l c h)
Click to copy to clipboard
500
hover
--color-primary-600
oklch( from var(--color-primary-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-primary-700
oklch( from var(--color-primary-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-primary-800
oklch( from var(--color-primary-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-primary-900
oklch( from var(--color-primary-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
dark
--color-primary-950
oklch( from var(--color-primary-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

secondary

light
--color-secondary-50
oklch( from var(--color-secondary-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-secondary-100
oklch( from var(--color-secondary-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-secondary-200
oklch( from var(--color-secondary-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-secondary-300
oklch( from var(--color-secondary-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
hover-light
--color-secondary-400
oklch( from var(--color-secondary-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-secondary-500
oklch(from var(--color-secondary) l c h)
Click to copy to clipboard
500
hover
--color-secondary-600
oklch( from var(--color-secondary-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-secondary-700
oklch( from var(--color-secondary-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-secondary-800
oklch( from var(--color-secondary-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-secondary-900
oklch( from var(--color-secondary-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
dark
--color-secondary-950
oklch( from var(--color-secondary-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

tertiary

light
--color-tertiary-50
oklch( from var(--color-tertiary-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-tertiary-100
oklch( from var(--color-tertiary-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-tertiary-200
oklch( from var(--color-tertiary-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-tertiary-300
oklch( from var(--color-tertiary-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
hover-light
--color-tertiary-400
oklch( from var(--color-tertiary-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-tertiary-500
oklch(from var(--color-tertiary) l c h)
Click to copy to clipboard
500
hover
--color-tertiary-600
oklch( from var(--color-tertiary-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-tertiary-700
oklch( from var(--color-tertiary-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-tertiary-800
oklch( from var(--color-tertiary-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-tertiary-900
oklch( from var(--color-tertiary-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
dark
--color-tertiary-950
oklch( from var(--color-tertiary-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

neutral

light
--color-neutral-50
oklch( from var(--color-neutral-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-neutral-100
oklch( from var(--color-neutral-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-neutral-200
oklch( from var(--color-neutral-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-neutral-300
oklch( from var(--color-neutral-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
--color-neutral-400
oklch( from var(--color-neutral-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-neutral-500
oklch(from var(--color-neutral) l c h)
Click to copy to clipboard
500
--color-neutral-600
oklch( from var(--color-neutral-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-neutral-700
oklch( from var(--color-neutral-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-neutral-800
oklch( from var(--color-neutral-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-neutral-900
oklch( from var(--color-neutral-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
dark
--color-neutral-950
oklch( from var(--color-neutral-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

attention

light
--color-attention-50
oklch( from var(--color-attention-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-attention-100
oklch( from var(--color-attention-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-attention-200
oklch( from var(--color-attention-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-attention-300
oklch( from var(--color-attention-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
--color-attention-400
oklch( from var(--color-attention-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-attention-500
oklch(from var(--color-attention) l c h)
Click to copy to clipboard
500
--color-attention-600
oklch( from var(--color-attention-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-attention-700
oklch( from var(--color-attention-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-attention-800
oklch( from var(--color-attention-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-attention-900
oklch( from var(--color-attention-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
--color-attention-950
oklch( from var(--color-attention-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

success

light
--color-success-50
oklch( from var(--color-success-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-success-100
oklch( from var(--color-success-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-success-200
oklch( from var(--color-success-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-success-300
oklch( from var(--color-success-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
--color-success-400
oklch( from var(--color-success-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-success-500
oklch(from var(--color-success) l c h)
Click to copy to clipboard
500
--color-success-600
oklch( from var(--color-success-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-success-700
oklch( from var(--color-success-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-success-800
oklch( from var(--color-success-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-success-900
oklch( from var(--color-success-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
--color-success-950
oklch( from var(--color-success-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

error

light
--color-error-50
oklch( from var(--color-error-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-error-100
oklch( from var(--color-error-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-error-200
oklch( from var(--color-error-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-error-300
oklch( from var(--color-error-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
--color-error-400
oklch( from var(--color-error-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-error-500
oklch(from var(--color-error) l c h)
Click to copy to clipboard
500
--color-error-600
oklch( from var(--color-error-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-error-700
oklch( from var(--color-error-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-error-800
oklch( from var(--color-error-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-error-900
oklch( from var(--color-error-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
--color-error-950
oklch( from var(--color-error-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

promotion

--color-promotion-50
oklch( from var(--color-promotion-100) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
50
--color-promotion-100
oklch( from var(--color-promotion-200) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
100
--color-promotion-200
oklch( from var(--color-promotion-300) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
200
--color-promotion-300
oklch( from var(--color-promotion-400) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
300
--color-promotion-400
oklch( from var(--color-promotion-500) calc(1 - (1 - l) * 0.6) calc(c * 0.8) h
Click to copy to clipboard
400
default
--color-promotion-500
oklch(from var(--color-promotion) l c h)
Click to copy to clipboard
500
--color-promotion-600
oklch( from var(--color-promotion-500) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
600
--color-promotion-700
oklch( from var(--color-promotion-600) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
700
--color-promotion-800
oklch( from var(--color-promotion-700) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
800
--color-promotion-900
oklch( from var(--color-promotion-800) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
900
--color-promotion-950
oklch( from var(--color-promotion-900) calc(l * 0.8) calc(c * 1.1) h
Click to copy to clipboard
950

Skins

A number of categories of element styles are provided. These should be applied throughout a site to maintain visual consistency, and allow for site wide theming at the css layer - although they can be overridden (for example by tailwind classes) at each use case without effecting other instances.

Each set defines the background, foreground and border colours at both a default state, and in states where there is interaction.

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled

Base Class Name:

Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Default

Interactive Class Name:

(includes default state)
Click to copy class name to clipboard
Copied to clipboard!
State Background Foreground Border
Hover
Focus
Active
Disabled
Click to copy CSS variable name to clipboard

Radius

By default, the site radius is applied to all rounded corners. This can be overridden using custom CSS or tailwind at a per use case level, but it is advised to use the site radius provided to maintain consistency and allow for easy updates of your theme. If using other radii, it is advised to use a css calculation to calculate the radius from the site radius, to maintain consistency if the site radius is updated.

--radius-site
1rem

Shadow

Like with the radius, the use of a singular site shadow is promoted in order to maintain consistency and allow for easy updates of your theme. As with the radius, this can be overridden at a per use case level, but it is advised to use the site shadow provided.

--shadow-site

Animations

Primitive animation speeds are provided using CSS variables to maintain consistency across different components. These variables control the duration of various animations throughout your project. As with other values, these can be overridden according to your sites preference.

--duration-speed-none
0s
--duration-speed-quick
0.1s
--duration-speed-default
0.2s
--duration-speed-slow
0.3s

Typography

Below are the primitive typography styles that form the foundation of our text elements.

In order to update the appearance of your typography, the primitive typography variables below can be updated.

Desktop Font Sizes

--text-desktop-2xl
--line-height-desktop-desktop-2xl
Altitude
45px
56px
--text-desktop-xl
--line-height-desktop-desktop-xl
Altitude
37px
48px
--text-desktop-2lg
--line-height-desktop-desktop-2lg
Altitude
30px
40px
--text-desktop-lg
--line-height-desktop-desktop-lg
Altitude
24px
32px
--text-desktop-md
--line-height-desktop-desktop-md
Altitude
20px
28px
--text-desktop-body
--line-height-desktop-desktop-body
Altitude
16px
24px
--text-desktop-sm
--line-height-desktop-desktop-sm
Altitude
14px
20px
--text-desktop-xs
--line-height-desktop-desktop-xs
Altitude
13px
20px

Mobile Font Sizes

--text-mobile-2xl
--line-height-mobile-mobile-2xl
Altitude
32px
40px
--text-mobile-xl
--line-height-mobile-mobile-xl
Altitude
28px
36px
--text-mobile-2lg
--line-height-mobile-mobile-2lg
Altitude
24px
32px
--text-mobile-lg
--line-height-mobile-mobile-lg
Altitude
21px
28px
--text-mobile-md
--line-height-mobile-mobile-md
Altitude
18px
24px
--text-mobile-body
--line-height-mobile-mobile-body
Altitude
16px
24px
--text-mobile-sm
--line-height-mobile-mobile-sm
Altitude
14px
20px
--text-mobile-xs
--line-height-mobile-mobile-xs
Altitude
13px
20px

Font Weights

--font-thin
Altitude
100
--font-extra-light
Altitude
200
--font-light
Altitude
300
--font-normal
Altitude
400
--font-medium
Altitude
500
--font-semi-bold
Altitude
600
--font-bold
Altitude
700
--font-extra-bold
Altitude
800
--font-black
Altitude
900