# goober

css-in-js at the cost of peanuts. goober is a css-in-js library with the styled paradigm in about 1.2 KB gzipped. API: styled, css, keyframes, extractCss, createGlobalStyles, setup. Framework agnostic: call setup(pragma) once before the first styled() call.

```sh
npm i goober
```

```js
import { styled, setup } from 'goober';
import { createElement } from 'react';

setup(createElement);

const Button = styled('button')`
    background: royalblue;
    color: white;

    &:hover {
        background: crimson;
    }
`;
```

## Weigh-in

Measured 2026-11-28. esbuild 0.28, minified, gzip level 9, react external, one styled button. See website/measure.

| Library | min + gzip | SSR renderToString |
| --- | --- | --- |
| goober 2.2.0 | 1,275 B | 209,814 ops/sec |
| @emotion/styled 11.14.1 | 11,236 B | 93,083 ops/sec |
| styled-components 6.7.0 | 11,092 B | 32,192 ops/sec |

Reproduce: https://github.com/cristianbote/goober/tree/master/website/measure

## Use it with an agent

- Tell it: "Add goober to this project. Read https://goober.rocks/llms.txt first."
- Install the skill: `npx skills add cristianbote/goober`
- Index: https://goober.rocks/llms.txt
- Everything in one file: https://goober.rocks/llms-full.txt

## Links

- Docs: https://goober.js.org
- GitHub: https://github.com/cristianbote/goober
- npm: https://www.npmjs.com/package/goober
