# goober

> A less than 1KB css-in-js solution

Source: https://talira.ai/catalog/goober-bq3mcays
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / css in js](https://talira.ai/categories/libraries/css-in-js), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Platforms: web
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Plugins: yes
- Backed by: [goober](https://talira.ai/orgs/goober.md)
- Creator: Cristian Bote (cristianbote)
- Funding: funded by donations[^1][^2]

goober is a CSS-in-JS library of about 1KB with the familiar `styled`, `css`, `keyframes` and global styles APIs, written as a smaller alternative to styled-components and Emotion. It is framework agnostic: you call `setup` with [React](https://talira.ai/catalog/react-a48drvqv.md)'s `createElement` or Preact's `h`, and it can render styles into any DOM target, which helps with web components. It supports theming, a prefixer, server-side rendering through `extractCss`, [TypeScript](https://talira.ai/catalog/typescript-w0asrgz8.md) types and Content Security Policy nonces for its style tag. [Babel](https://talira.ai/catalog/babel-qwk4bqkg.md), [Next.js](https://talira.ai/catalog/next-js-2chrxyc7.md), Gatsby and Preact CLI integrations are available.

## Links

- Website: https://goober.rocks
- GitHub: https://github.com/cristianbote/goober
- Docs: https://goober.js.org/

## Problems it solves

- styled-components adds too many kilobytes to my small widget
- I want the styled API in Preact without pulling in a big library
- scope styles inside a web component or a specific DOM node
- my inline styles get blocked by a strict content security policy
- server-render critical CSS for my components
- theme colours and sizes across components with a tiny CSS-in-JS library
- write component styles in JavaScript for an embeddable script where every byte counts
- add vendor prefixes to CSS generated at runtime
- a CSS-in-JS library that works with React and Preact alike

## Features

- styled, css, keyframes and createGlobalStyles APIs
- about 1KB
- framework agnostic (React, Preact)
- render into any DOM target
- theming
- shouldForwardProp
- server-side rendering with extractCss
- prefixer (goober/prefixer)
- TypeScript types
- CSP nonces via window.__nonce__
- Babel plugin and macro
- Next.js, Gatsby and Preact CLI integrations

## Capabilities

- Takes plugins: plan not known

## Trust

Overall: 0.49 out of 1.
Signals: maintenance 0.27, adoption 0.70, momentum 0.47, community 0.73, backing 0.75, extensibility 0.20.

- latest release v2.1.19 6 months ago
- 3.3k GitHub stars
- 64 contributors
- accepts sponsorship (Open Collective)
- has a company behind it
- created by Cristian Bote (cristianbote)
- funding: funded by donations
- has a plugin system

Warnings:

- last commit 6 months ago

## Alternatives

- [styled-components](https://talira.ai/catalog/styled-components-97cxpqhn.md): Fast, expressive styling for React. Server components, client components, streaming SSR, React Native, all one API.
- [Emotion](https://talira.ai/catalog/emotion-cdf86k4g.md): CSS-in-JS library designed for high performance style composition

## Sources

[^1]: https://opencollective.com/goober (checked 20 Nov 2026)
[^2]: https://github.com/cristianbote/goober (checked 20 Nov 2026)
