Tailwind Class Reference
The EBRAINS-specific classes that the Tailwind factory generates from the design tokens in packages/assets/tokens. Standard Tailwind utilities (flex, items-center, hidden, …) work as usual; see the Tailwind documentation.
Colours
Colour classes are semantic: they name a role, not a colour. bg-default is the brand black ground and bg-inverse is white, so a light page uses bg-inverse and dark bands use bg-strongest.
Backgrounds
| Class | Token | Value |
|---|---|---|
bg-default | brand-black | #07140D |
bg-inverse | white | #FFFFFF |
bg-inverse-soft | rgba(0, 0, 0, .05) | rgba(0, 0, 0, .05) |
bg-dark | grey-light | #ECECEC |
bg-darker | grey-dark | #7A7B7A |
bg-strong | grey-700 | #666666 |
bg-strong-dark | grey-800 | #4d4d4d |
bg-stronger | grey-900 | #242424 |
bg-strongest | brand-black | #07140D |
bg-accent | brand-green | #00FF9D |
bg-accent-dark | brand-green-dark | #00C87B |
bg-success | green-200 | #d3ffdc |
bg-warning | yellow-200 | #ffffcb |
bg-error | red-200 | #ffe0e1 |
bg-current | currentColor | currentColor |
bg-transparent | transparent | transparent |
bg-overlay | rgba(0, 0, 0, 0.25) | rgba(0, 0, 0, 0.25) |
bg-on-gradient | rgba(0, 0, 0, 0.1) | rgba(0, 0, 0, 0.1) |
bg-on-dark | rgba(255, 255, 255, 0.2) | rgba(255, 255, 255, 0.2) |
Text
| Class | Token | Value |
|---|---|---|
text-default | brand-black | #07140D |
text-inverse | white | #FFFFFF |
text-current | currentColor | currentColor |
text-transparent | transparent | transparent |
text-light | grey-700 | #666666 |
text-lighter | grey-light | #ECECEC |
text-lightest | grey-500 | #8c8c8c |
text-extra-light | grey-300 | #e6e6e6 |
text-success | green-800 | #007734 |
text-warning | yellow-900 | #636313 |
text-error | red-700 | #d01111 |
text-accent | brand-green | #00FF9D |
text-accent-dark | brand-green-dark | #00C87B |
text-on-gradient | rgba(0, 0, 0, 0.55) | rgba(0, 0, 0, 0.55) |
text-on-dark | white | #FFFFFF |
Borders
| Class | Token | Value |
|---|---|---|
border-default | brand-black | #07140D |
border-inverse | white | #FFFFFF |
border-inverse-soft | rgba(255, 255, 255, 0.3) | rgba(255, 255, 255, 0.3) |
border-inverse-softer | rgba(255, 255, 255, 0.15) | rgba(255, 255, 255, 0.15) |
border-soft | rgba(0, 0, 0, .15) | rgba(0, 0, 0, .15) |
border-softer | rgba(0, 0, 0, .1) | rgba(0, 0, 0, .1) |
border-softest | rgba(0, 0, 0, .05) | rgba(0, 0, 0, .05) |
border-accent | brand-green | #00FF9D |
border-accent-dark | brand-green-dark | #00C87B |
border-error | red-700 | #d01111 |
border-current | currentColor | currentColor |
border-transparent | transparent | transparent |
border-grey | grey-light | #ECECEC |
border-grey-dark | grey-dark | #7A7B7A |
Gradients
| Class |
|---|
bg-brand |
bg-gradient-01-top |
bg-gradient-02-top |
bg-gradient-03-top |
bg-gradient-04-top |
bg-gradient-01-bottom |
bg-gradient-02-bottom |
bg-gradient-03-bottom |
bg-gradient-04-bottom |
Typography
Each f-* class sets the font, weight, size, line height and letter spacing in one go, and grows at the breakpoints shown. Use them instead of text-* sizes and font-* weights.
| Class | Font | Weight | Size | Line height | Case |
|---|---|---|---|---|---|
f-heading-01 | Inter | 300 | 42px → md: 48px → lg: 72px → xl: 83px | 100% | |
f-heading-02 | Inter | 300 | 36px → lg: 48px → xl: 60px | 100% | |
f-heading-03 | Inter | 300 | 36px → xl: 42px | 100% | |
f-heading-04 | Inter | 300 | 28px → xl: 36px | 100% | |
f-heading-05 | Inter | 300 | 28px | 110% | |
f-heading-06 | Inter | 300 | 22px | 120% | |
f-body-01 | IBM Plex Sans | 400 | 20px | 140% | |
f-body-02 | IBM Plex Sans | 400 | 17px | 150% | |
f-body-03 | IBM Plex Sans | 400 | 17px | 150% | |
f-ui-01 | IBM Plex Sans | 400 | 18px | 110% | |
f-ui-02 | IBM Plex Sans | 400 | 16px | 110% | |
f-ui-02-light | IBM Plex Sans | 400 | 16px | 110% | |
f-ui-03 | IBM Plex Sans | 400 | 14px | 110% | |
f-ui-03-light | IBM Plex Sans | 400 | 14px | 130% | |
f-ui-04 | IBM Plex Sans | 400 | 12px | 100% | |
f-ui-05 | IBM Plex Sans | 400 | 10px | 110% | |
f-caption | IBM Plex Sans | 400 | 12px | 120% | |
f-code | IBM Plex Mono | 400 | 14px | 140% | |
f-label | IBM Plex Mono | 400 | 12px | 120% | uppercase |
f-display-01 | Inter | 300 | 120px → lg: 150px | 100% | |
f-display-02 | Inter | 300 | 120px → lg: 150px | 100% |
font-sans is IBM Plex Sans and font-mono is IBM Plex Mono, so text without an f-* class still uses the brand faces.
Spacing
Spacing is in pixels. A class number is its size: p-16 is 16px, gap-24 is 24px. It works with every spacing utility (p, m, gap, space, inset, w, h, min-h).
Values: 0 1 2 3 4 5 6 7 8 9 10 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100.
Prefer multiples of 4 on the scale 0 4 8 12 16 24 32 48 64: they are the values the layout primitives use.
Section spacing
Vertical rhythm between page sections, responsive by default:
| Group | Size | Classes |
|---|---|---|
space-01 | 80px → lg: 120px | pt-space-01, pb-space-01, py-space-01, mt-space-01, mb-space-01, my-space-01 |
space-02 | 60px → lg: 80px | pt-space-02, pb-space-02, py-space-02, mt-space-02, mb-space-02, my-space-02 |
space-03 | 100px → lg: 120px | pt-space-03, pb-space-03, py-space-03, mt-space-03, mb-space-03, my-space-03 |
space-04 | 28px | pt-space-04, pb-space-04, py-space-04, mt-space-04, mb-space-04, my-space-04 |
Layout
Breakpoints
Mobile first: a class without a prefix applies from 0px, a prefixed class from its breakpoint up.
| Prefix | From | Outer gutter | Inner gutter | Columns |
|---|---|---|---|---|
| (none) | 0px | 16px | 8px | 12 |
md: | 750px | 20px | 12px | 12 |
lg: | 900px | 28px | 16px | 12 |
xl: | 1024px | 28px | 16px | 12 |
xxl: | 1280px | 28px | 16px | 12 |
xxxl: | 2200px | 28px | 16px | 12 |
Container
| Class | Max width |
|---|---|
max-w-xxxl | 2200px |
max-w-default | 1440px |
max-w-reader | 1224px |
max-w-sidebar | 1224px |
container adds the outer gutters for each breakpoint. Combine it with a max width and mx-auto: container max-w-default mx-auto.
Grid
grid-layout creates the 12-column grid with the inner gutters above. Place items with grid-col-span-{n} and grid-col-start-{n}, with breakpoint prefixes (grid-col-span-12 lg:grid-col-span-8). For simple equal columns, grid grid-cols-{n} gap-{n} works too.
Shape and depth
Radii
| Class | Radius |
|---|---|
rounded-xxs | 2px |
rounded-xs | 4px |
rounded-sm | 8px |
rounded-md | 12px |
rounded-lg | 16px |
rounded-pill | 100px |
Shadows
| Class |
|---|
shadow-small |
shadow-medium |
shadow-hover |
shadow-accent |
shadow-accent-focus |
shadow-border |
shadow-border-top |
shadow-elevated |
shadow-overlay |
shadow-none |
Drop shadows for images and icons: drop-shadow-small, drop-shadow-medium, drop-shadow-accent-glow.
Aspect ratios
| Class | Ratio |
|---|---|
aspect-1x1 | 1/1 |
aspect-21x9 | 21/9 |
aspect-16x9 | 16/9 |
aspect-3x2 | 3/2 |
aspect-4x3 | 4/3 |
aspect-4x5 | 4/5 |
Always available
The factory safelists the colour, typeset, radius, shadow and ratio classes above, grid-cols-1…grid-cols-12, the grid-col-* spans and starts, and line-clamp-1/3/4, so they work even in markup Tailwind can’t scan (CMS content, strings built at runtime). Anything else must appear in a file listed in contentPaths, or be added to the factory’s safelist option.
Related
- Tailwind Factory API: the configuration function
- Customise Your App’s Tailwind Config: add paths, theme extensions and safelisted classes
- Layout Primitives and Foundations on the design system site