tonami
Version:
Minimal CSS-in-JS library that promotes CSS best-practices and strongly-typed design systems.
81 lines (57 loc) • 1.54 kB
Markdown
<div align="center">
CSS-in-JS library with a familiar API that uses CSS custom properties under the hood
[![version][version-badge]][package]
![downloads per month][downloads]
![gzipped size][size]
![test coverage][coverage]
</div>
> 🚨 **Warning**
>
> Until we reach v1.0.0 the API still may change.
```bash
yarn add tonami
```
https://tonami.dev
```jsx
import { createTokens, styled, createGlobalStyle } from "tonami";
const theme = createTokens({
fontFamily: "Helvetica",
borderRadius: "3px",
});
const Global = createGlobalStyle({
html: {
fontFamily: theme.fontFamily,
},
});
const Banner = styled.div({
borderRadius: theme.borderRadius,
backgroundColor: ({ $color }) => $color,
});
const { Tokens } = theme;
function App() {
return (
<>
<Tokens />
<Global />
<Banner $color="lightgreen">Welcome!</Banner>
</>
);
}
```
Please file an issue for bugs or unexpected behavior.
Please file an issue to suggest new features. Vote on feature requests by adding a 👍.
MIT
<!-- prettier-ignore-start -->
[]: https://img.shields.io/npm/v/tonami?style=flat-square
[]: https://www.npmjs.com/package/tonami
[]: https://img.shields.io/npm/dm/tonami?style=flat-square
[]: https://img.shields.io/bundlephobia/minzip/tonami?style=flat-square
[]: https://img.shields.io/codecov/c/github/tone-row/tonami?style=flat-square
<!-- prettier-ignore-end -->