# @rhjs/atomic-css

> css in js + atomic

Latest version **0.3.5** (published 2023-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rhjs/atomic-css
pnpm add @rhjs/atomic-css
yarn add @rhjs/atomic-css
bun add @rhjs/atomic-css
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.5 |
| Published | 2023-12-14 |
| First published | 2023-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zhzluke96 |
| Maintainers | luke_zhang |
| Keywords | atomic css, rhjs |

## Links

- npm: https://www.npmjs.com/package/@rhjs/atomic-css
- Repository: https://github.com/zhzLuke96/rh-atomic-css
- Homepage: https://github.com/zhzLuke96/rh-atomic-css#readme
- Issues: https://github.com/zhzLuke96/rh-atomic-css/issues
- npm.io page: https://npm.io/package/@rhjs/atomic-css

## Dependencies (8)

- [@rhjs/core](https://npm.io/package/@rhjs/core.md) ^0.3.5
- [@rhjs/hooks](https://npm.io/package/@rhjs/hooks.md) ^0.3.4
- [@twind/core](https://npm.io/package/@twind/core.md) ^1.1.3
- [@rhjs/builtin](https://npm.io/package/@rhjs/builtin.md) ^0.3.4
- [@twind/preset-tailwind](https://npm.io/package/@twind/preset-tailwind.md) ^1.1.4
- [@twind/preset-autoprefix](https://npm.io/package/@twind/preset-autoprefix.md) ^1.0.7
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^15.1.0
- [@twind/preset-tailwind-forms](https://npm.io/package/@twind/preset-tailwind-forms.md) ^1.1.2

## Recent versions

- 0.3.5 (latest) — 2023-12-14
- 0.0.4 — 2023-06-18
- 0.0.3 — 2023-06-18
- 0.0.2 — 2023-06-04
- 0.0.1 — 2023-06-03

## README

# rh-atomic-css

css in js + atomic

# Usage

## default

```ts
import { rh, mount } from "@rhjs/core";
import { Scope } from "@rhjs/builtin";
import { html } from "@rhjs/tag";
import { enable } from "@rhjs/atomic-css";

// all default settings
enable();

const app = html`<div $class="font-bold text-gray-900">hello world</div>`;
mount("#app", app);
```

## custom configuration

```ts
import { rh, mount } from "@rhjs/core";
import { Scope } from "@rhjs/builtin";
import { html } from "@rhjs/tag";
import { enable, setAtomicConfig } from "@rhjs/atomic-css";

// inject config to context
setAtomicConfig({
    presets: [], // cover all preset (tailwind css)
    hash: false
})
// inject to framework context, and hook attribute `$class` (default: $atomic)
enable("$class");

const app = html`<div $class="font-bold text-gray-900">hello world</div>`;
mount("#app", app);
```

# License

MIT

---
_Source: https://npm.io/package/@rhjs/atomic-css · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
