CSS Framework

The @ebrains/assets package provides two ready-to-use CSS files that give you access to the entire EBRAINS visual system — without needing to install the component library or set up Tailwind.

Installation

Via NPM

Then import in your project:

Via CDN (unpkg)

Which file should I use?

FileSizeUse when…
output.css~250KBYou want the utility classes used by the EBRAINS components (colors, typography, layout, spacing, effects) plus all variables
vars.css~11KBYou only need CSS variables and font declarations to use in your own styles

What’s in vars.css

The lightweight file contains only CSS custom properties and @font-face declarations. No utility classes, no resets — just the raw design tokens as CSS variables.

Font Faces

Brand Colors

Extended Color Scales

Eight color scales with shades from 100 to 900: --grey-*, --green-*, --blue-*, --red-*, --yellow-*, --orange-*, --purple-*, --cyan-*.

Typography Variables

Every heading, body, UI, display, caption, and code style is defined as a set of variables:

Usage example:

Responsive Breakpoints

Typography and spacing variables update automatically at each breakpoint:

BreakpointMin-widthExample change
sm0--f-heading-01-fontSize: 42px
md750px--f-heading-01-fontSize: 48px
lg900px--f-heading-01-fontSize: 72px
xl1024px--f-heading-01-fontSize: 83px
xxl1280pxNo typography change (inherits xl values)
xxxl2200pxNo typography change (inherits xl values)

Layout Variables

Spacing Tokens

What’s in output.css

The full framework includes everything from vars.css plus utility classes built with Tailwind CSS from the EBRAINS design tokens.

Background Colors

Text Colors

Typography Classes

Apply a full type style with a single class:

Layout & Grid

Spacing

Padding and margin utilities use the spacing scale (in px). Only the values used by the components are included in output.css:

System spacing tokens: 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96, 128, 160, 196. With a full Tailwind setup every value of the scale is available; in output.css only the combinations used by the components exist (for example p-196 and m-6 are not included).

Flexbox & Display

Border Radius

Shadows

The shadow tokens are small, medium, hover, accent, accent-focus, border, border-top, elevated, overlay and none. All of them are safelisted, so every shadow-* class is in output.css.

Effects & Transitions

Responsive Prefixes

Utility classes can be prefixed with breakpoint names:

PrefixMin-width
sm:0 (default)
md:750px
lg:900px
xl:1024px
xxl:1280px
xxxl:2200px

As with other utilities, output.css only contains the responsive variants the components use (for example md:hidden exists but md:block does not). Typography classes (f-*) are already responsive, so they don’t need prefixes.

Aspect Ratios

Font Files

The package includes self-hosted font files at @ebrains/assets/fonts/:

FontWeightFile
InterLight 300Inter-Light.woff2
IBM Plex SansRegular 400IBMPlexSans-Regular.woff2
IBM Plex SansSemiBold 600IBMPlexSans-SemiBold.woff2
IBM Plex MonoRegular 400IBMPlexMono-Regular.woff2

Both output.css and vars.css include @font-face declarations that reference these files. If serving from a CDN, the fonts load automatically from unpkg.