@sobagu/react
v0.1.2
Published
Sobagu CSS for React: Box, Stack, Grid and Text with easy style props
Maintainers
Readme
@sobagu/react
Sobagu for React: Box, Stack, Grid and Text components that take short style props
(p="md", bg="surface", hover={{ shadow: 'lg' }}, md={{ ... }}). No config file and no build
plugin: the theme and a small CSS reset are injected the first time a style is used.
Install
npm i @sobagu/core @sobagu/reactNeeds React 19 or newer. List @sobagu/core yourself as above: you import getCssText() from it for SSR, and pnpm only lets you import packages you installed directly.
Usage
import { Box, Stack, Text } from '@sobagu/react'
export function Card() {
return (
<Stack gap="md" md={{ flexDir: 'row' }}>
<Box p="lg" bg="surface" radius="lg" hover={{ shadow: 'lg' }}>
<Text size="xl" weight="bold" color="primary">Hello</Text>
<Text muted>Short, readable props. Dark mode for free.</Text>
</Box>
</Stack>
)
}For server-side rendering, put getCssText() from @sobagu/core in a <style> tag in the page head.
Docs
Sobagu is in 0.x: the API can still change between minor versions.
Licence
MIT © 2026 Sobagu contributors
