Skip to content

Commit 7ff0654

Browse files
feat(docs): update README and getting started guide with installation instructions and usage examples
1 parent 64db567 commit 7ff0654

3 files changed

Lines changed: 77 additions & 4 deletions

File tree

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ V14's internal React component library — accessible, headless primitives from
2727
- Fully typed — strict TypeScript throughout
2828
- Accessible — ARIA compliance via Ark UI primitives
2929
- Themeable — all visual variants are PandaCSS `sva()` recipes
30-
- Tree-shakeable — dual ESM/CJS build, `sideEffects: false`
30+
- Tree-shakeable JS — dual ESM/CJS build with explicit CSS entrypoints
3131

3232
---
3333

@@ -42,6 +42,37 @@ V14's internal React component library — accessible, headless primitives from
4242

4343
### Installation
4444

45+
For app usage:
46+
47+
```bash
48+
npm install @version14/ui
49+
```
50+
51+
Import the generated component styles once in your app root:
52+
53+
```ts
54+
import "@version14/ui/styles.css";
55+
```
56+
57+
If you want the bundled Geist and Nyght font faces, import the font stylesheet too:
58+
59+
```ts
60+
import "@version14/ui/fonts.css";
61+
```
62+
63+
For PandaCSS token integration, add the preset to your app's Panda config:
64+
65+
```ts
66+
import { defineConfig } from "@pandacss/dev";
67+
import { v14Preset } from "@version14/ui/preset";
68+
69+
export default defineConfig({
70+
presets: [v14Preset],
71+
});
72+
```
73+
74+
For local component development:
75+
4576
```bash
4677
git clone https://github.com/v14/ui.git
4778
cd ui

docs/getting-started/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,38 @@ Make sure your IDE uses the project's TypeScript version (not a global one). In
137137
Confirm the story file ends in `.stories.tsx` — only that extension is picked up.
138138

139139
For other issues, see the [FAQ](../developer-guide/faq.md) or open a Discussion.
140+
141+
---
142+
143+
## Using the Package in an App
144+
145+
Install the package:
146+
147+
```bash
148+
npm install @version14/ui
149+
```
150+
151+
Import the generated component CSS once in your app root:
152+
153+
```ts
154+
import "@version14/ui/styles.css";
155+
```
156+
157+
Import bundled fonts when you want the default V14 typography assets:
158+
159+
```ts
160+
import "@version14/ui/fonts.css";
161+
```
162+
163+
If the app also uses PandaCSS, add the preset for the V14 tokens and semantic colors:
164+
165+
```ts
166+
import { defineConfig } from "@pandacss/dev";
167+
import { v14Preset } from "@version14/ui/preset";
168+
169+
export default defineConfig({
170+
presets: [v14Preset],
171+
});
172+
```
173+
174+
The preset provides tokens. The `styles.css` import provides the component class rules generated from this package's source.

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@version14/ui",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
44
"description": "V14 internal UI component library built on Ark UI and PandaCSS",
55
"author": "V14",
66
"license": "MIT",
@@ -29,6 +29,10 @@
2929
"default": "./dist/preset.cjs"
3030
}
3131
},
32+
"./styles.css": {
33+
"style": "./dist/styles.css",
34+
"default": "./dist/styles.css"
35+
},
3236
"./fonts.css": {
3337
"style": "./dist/fonts.css",
3438
"default": "./dist/fonts.css"
@@ -37,7 +41,10 @@
3741
"files": [
3842
"dist"
3943
],
40-
"sideEffects": ["./dist/fonts.css"],
44+
"style": "./dist/styles.css",
45+
"sideEffects": [
46+
"./dist/*.css"
47+
],
4148
"repository": {
4249
"type": "git",
4350
"url": "https://github.com/version14/ui"
@@ -49,7 +56,7 @@
4956
"node": ">=20"
5057
},
5158
"scripts": {
52-
"build": "panda codegen && tsup && cp src/fonts.css dist/ && cp -r src/assets dist/",
59+
"build": "panda codegen && tsup && panda cssgen './src/**/*.{ts,tsx}' --outfile dist/styles.css --minify && cp src/fonts.css dist/ && cp -r src/assets dist/",
5360
"dev": "tsup --watch",
5461
"prepare": "panda codegen && simple-git-hooks",
5562
"prepublishOnly": "pnpm build && pnpm lint && pnpm check-types && pnpm test",

0 commit comments

Comments
 (0)