@chartts/tailwind 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.npmjs.com/package/@chartts/tailwind"><img src="https://img.shields.io/npm/v/@chartts/tailwind?color=06B6D4&label=npm" alt="npm version" /></a>
|
|
3
|
+
<a href="https://github.com/chartts/chartts/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-06B6D4" alt="MIT License" /></a>
|
|
4
|
+
<a href="https://chartts.com"><img src="https://img.shields.io/badge/docs-chartts.com-06B6D4" alt="Documentation" /></a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# @chartts/tailwind
|
|
8
|
+
|
|
9
|
+
Tailwind CSS plugin for Chartts. Bridges Tailwind v3 color variables to the CSS custom properties Chartts reads, and adds theme preset utility classes.
|
|
10
|
+
|
|
11
|
+
> **Tailwind v4:** This plugin is optional. Tailwind v4 exposes `--color-*` variables natively, which Chartts reads automatically.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @chartts/tailwind
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Setup (Tailwind v3)
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
// tailwind.config.js
|
|
23
|
+
import chartts from "@chartts/tailwind"
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
plugins: [chartts()],
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## What it does
|
|
31
|
+
|
|
32
|
+
1. **Color variables** — Exposes all Tailwind colors as `--color-*` CSS custom properties on `:root`
|
|
33
|
+
2. **Theme classes** — Adds utility classes like `.chartts-theme-corporate`, `.chartts-theme-saas`, etc.
|
|
34
|
+
3. **Dark mode** — Adds `.dark .chartts` overrides and `prefers-color-scheme` support
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
chartts({
|
|
40
|
+
colors: true, // Expose --color-* variables (default: true)
|
|
41
|
+
themes: true, // Add theme utility classes (default: true)
|
|
42
|
+
darkMode: true, // Add dark mode overrides (default: true)
|
|
43
|
+
palette: {}, // Custom color palette to expose
|
|
44
|
+
})
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Part of Chartts
|
|
48
|
+
|
|
49
|
+
Beautiful charts. Tiny bundle. Every framework.
|
|
50
|
+
|
|
51
|
+
- [Documentation](https://chartts.com/docs)
|
|
52
|
+
- [GitHub](https://github.com/chartts/chartts)
|
|
53
|
+
- [All packages](https://www.npmjs.com/org/chartts)
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chartts/tailwind",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Tailwind CSS plugin for Chartts
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Tailwind CSS plugin for Chartts. Bridge Tailwind v3 color variables and theme presets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
18
19
|
],
|
|
19
20
|
"sideEffects": false,
|
|
20
21
|
"peerDependencies": {
|