An open-source CSS framework prioritizing functional classes over pre-designed UI components, reducing style duplication and enhancing development efficiency.
Tachyons is an open-source CSS framework created by Adam Morse. It takes a functional CSS approach by providing a library of single-purpose CSS classes from which developers can compose more complex UI styles.
Unlike frameworks like Bootstrap that include many pre-designed UI components, Tachyons focuses only on atomic, low-level utility classes. This means classes for things like colors, fonts, spacing, sizes, borders, and much more. The goal is to make it faster to build interfaces by reducing code duplication.
For example, Tachyons has classes like .f3 to set a font size, .bg-green for a green background, .pa3 for padding, and so on. You combine these classes to style elements without writing custom CSS.
This functional approach makes Tachyons very lightweight at around 14KB minified. It also makes it very customizable, as you have fine-grained control over applying styles. The performance and flexibility comes at the cost of a learning curve to understand how to best make use of the myriad class names.
Here are some alternatives to Tachyons:
Suggest an alternative ❐