
Description
Typography.js is a JavaScript toolkit for building websites with considered typography. You describe the design intent in a configuration object, and the Typography engine generates the CSS for block and inline elements, so that headings, body text and other styles stay in harmony instead of being set one rule at a time. The project explains that a typographic system has hundreds of interrelated style declarations, and that changing one value usually means many manual recalculations, which the engine handles. Themes are plain JavaScript objects that can be shared across projects or published to npm, and the project maintains more than thirty ready-made themes, each published as a separate npm package. A theme is used by installing its package and passing it to Typography when it is initialized, and it can be customized by changing the object, for example to increase the base font size, or by using the overrideThemeStyles function. Plugins are functions that extend or modify the engine, such as changing how headings are styled or adding styles for code and tables. The site has a demo playground, and the README lists websites that use the library.…
Highlights
- Generates CSS from a typographic configuration
- Themes as plain JavaScript objects
- Thirty-plus published themes
- Plugins for headings, code and tables
- Demo playground
Ratings & Reviews
No ratings yet
Be the first to rate typography.
People also visit
typography FAQ
What is Typography.js?
A JavaScript toolkit that generates CSS for a site's typography from a configuration object.
How do I install it?
Run npm install typography.
How do I use a theme?
Install the theme's npm package, then import it and pass it to Typography when you initialize it.
Can I change a theme?
Yes. Themes are plain objects, so you can modify them, or use the overrideThemeStyles function.
What are plugins?
Functions that extend or modify the engine, for example to restyle headings or add styles for code and tables.
Is there a demo?
Yes. The README links to a demo and playground site.
What are the best typography alternatives?
Popular alternatives to typography include react-simple-typewriter and react-textfit. See all typography alternatives
.gif?auto=compress&fit=max&w=128)













