@sobagu/core
v0.1.2
Published
Sobagu CSS core: framework-agnostic tokens, css() and atomic CSS engine
Maintainers
Readme
@sobagu/core
The framework-agnostic engine behind Sobagu: design tokens, the css() function that turns a style
object into atomic class names, light and dark themes, recipes and server-side CSS collection.
It has no dependencies and imports no framework. The React, Vue, Svelte, Solid and Angular packages
are thin layers on top of it.
Install
npm i @sobagu/coreUsage
import { css, cx, getCssText } from '@sobagu/core'
const card = css({ p: 'md', bg: 'surface', radius: 'lg', hover: { shadow: 'lg' }, md: { p: 'lg' } })
document.querySelector('#card')!.className = cx(card, 'my-own-class')
// The CSS is injected into the page the first time a style is used.
// During server-side rendering, put the collected CSS in the page head instead:
const styles = getCssText() // <style>{styles}</style>Docs
- Introduction and installation
- Style props, states, responsive design
- Theme and tokens, all style props
Sobagu is in 0.x: the API can still change between minor versions.
Licence
MIT © 2026 Sobagu contributors
