Analysis updated 2026-07-03
Style React components by writing CSS rules as JS objects next to the component code instead of maintaining separate CSS files.
Add hover effects, media queries, and keyframe animations to elements without writing any CSS files.
Server-side render a React app with styles already in the HTML so the page looks correct before JavaScript loads.
Replace Aphrodite in an existing project using the included compatibility shim.
| threepointone/glamor | getgauge/taiko | jasonlong/isometric-contributions | |
|---|---|---|---|
| Stars | 3,669 | 3,668 | 3,670 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 1/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
glamor is a JavaScript library for writing CSS styles directly inside your JavaScript code. Instead of maintaining separate stylesheet files, you define your styles as plain objects in JS and apply them to HTML elements. It was built with React in mind but works with any framework or with plain JavaScript. The core idea is that you call a css() function with a style object, and it returns something you can attach to a DOM element either as a class name or as a data attribute. Styles can include pseudo-classes like hover and focus, media queries for different screen sizes, keyframe animations, and font-face declarations. All the CSS features you would use in a regular stylesheet are available. glamor automatically adds vendor prefixes where needed so you do not have to write them manually. One of its practical benefits is style deduplication: if two components define the same rule, glamor writes it to the browser's stylesheet only once. In production mode it uses the browser's built-in insertRule method, which is fast. In development mode it writes to a visible style tag so you can inspect and edit styles in the browser's developer tools. You can toggle between the two modes manually if needed. The library also ships optional extras. There is a CSS reset you can import, helpers for theming, a compatibility shim for codebases using a different CSS-in-JS library called Aphrodite, and an experimental port of the styled-components API. It also supports server-side rendering, which matters when you need the page to arrive with styles already applied rather than waiting for JavaScript to run. Installation is a single npm command. The README includes links to API documentation, a how-to guide comparing different styling techniques, notes on performance, and a description of how the library works internally.
glamor lets you write CSS styles as JavaScript objects instead of separate stylesheet files. It works with React and any other framework, with automatic vendor prefixes and style deduplication.
Mainly JavaScript. The stack also includes JavaScript, CSS-in-JS.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.