The fuselage provides a structured palette system that enables consistent, scalable color usage across components. Instead of applying raw color values, developers use design tokens, which act as semantic references for colors.
Using tokens ensures:
Consistency across the UI
Easier theme customization
Reduced maintenance when colors change
Better alignment with Rocket.Chat’s design standards
Tokens are applied at the component level, allowing updates without requiring changes throughout the entire codebase.
How to use the palette system
Using tokens in components
Apply surface tokens with the bg prop and font tokens with the color prop:
<Box bg='status-background-info' color='status-font-on-info' />If preferred, you can still use the full token names:
<Box bg='surface-neutral' color='font-default' />Both approaches produce the same result.
Using the palette in React
Import the palette directly from Fuselage:
import { Palette } from '@rocket.chat/fuselage';You can then reference tokens programmatically:
const surfaceHover = Palette.surface['surface-hover'];
const strokeLight = Palette.stroke['stroke-extra-light'];