shadcn-chart 0.1.3 → 0.2.1
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 +27 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -18,6 +18,26 @@ Beautiful, customizable chart components built with [shadcn/ui](https://ui.shadc
|
|
|
18
18
|
|
|
19
19
|
## 📦 Installation
|
|
20
20
|
|
|
21
|
+
### Option 1: shadcn CLI (Recommended)
|
|
22
|
+
|
|
23
|
+
Add individual chart components directly to your project:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Install a single chart
|
|
27
|
+
npx shadcn add https://mnhtng.github.io/shadcn-chart/public/r/area-chart.json
|
|
28
|
+
|
|
29
|
+
# Or install all charts
|
|
30
|
+
npx shadcn add https://mnhtng.github.io/shadcn-chart/public/r/area-chart.json \
|
|
31
|
+
https://mnhtng.github.io/shadcn-chart/public/r/bar-chart.json \
|
|
32
|
+
https://mnhtng.github.io/shadcn-chart/public/r/line-chart.json \
|
|
33
|
+
https://mnhtng.github.io/shadcn-chart/public/r/pie-chart.json \
|
|
34
|
+
https://mnhtng.github.io/shadcn-chart/public/r/radial-chart.json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This copies the component source to your project, allowing full customization.
|
|
38
|
+
|
|
39
|
+
### Option 2: npm Package
|
|
40
|
+
|
|
21
41
|
```bash
|
|
22
42
|
npm install shadcn-chart
|
|
23
43
|
# or
|
|
@@ -169,7 +189,13 @@ The package uses CSS variables for theming. Override these in your CSS:
|
|
|
169
189
|
|
|
170
190
|
### Tailwind v4
|
|
171
191
|
|
|
172
|
-
|
|
192
|
+
If you're using a bundler like Vite with `@tailwindcss/vite`, you need to add a `@source` directive so Tailwind can scan the package's utility classes:
|
|
193
|
+
|
|
194
|
+
```css
|
|
195
|
+
@import "tailwindcss";
|
|
196
|
+
|
|
197
|
+
@source "../node_modules/shadcn-chart";
|
|
198
|
+
```
|
|
173
199
|
|
|
174
200
|
### Tailwind v3
|
|
175
201
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-chart",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Headless and styled chart components built with shadcn/ui conventions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"dev": "tsup --watch",
|
|
31
31
|
"typecheck": "tsc --noEmit",
|
|
32
32
|
"prepublishOnly": "npm run build",
|
|
33
|
+
"registry:build": "shadcn build",
|
|
33
34
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
34
35
|
},
|
|
35
36
|
"repository": {
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"react": "^19.2.3",
|
|
76
77
|
"react-dom": "^19.2.3",
|
|
77
78
|
"recharts": "^2.15.4",
|
|
79
|
+
"shadcn": "^3.6.3",
|
|
78
80
|
"tailwindcss": "^4.1.18",
|
|
79
81
|
"tsup": "^8.3.5",
|
|
80
82
|
"typescript": "^5.9.3"
|