Skip to content

Commit 2ea6cf3

Browse files
committed
docs: update docs for next release
1 parent 3fd978e commit 2ea6cf3

File tree

3 files changed

+78
-84
lines changed

3 files changed

+78
-84
lines changed

packages/panda/CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ description: All notable changes will be documented in this file.
66

77
## [Unreleased]
88

9+
### Removed
10+
11+
- **Breaking**: The Park UI Preset no longer includes component recipes. From now on, recipes will be added to your project when you install a component via the CLI, giving you full flexibility to customize them as needed. To migrate, simply reinstall your components using the CLI.
12+
13+
Afterward, update your `panda.config.ts` as follows:
14+
15+
```tsx
16+
// other imports
17+
import { recipes, slotRecipes } from '~/theme/recipes'
18+
19+
export default defineConfig({
20+
// other configuration
21+
theme: {
22+
extend: {
23+
recipes,
24+
slotRecipes,
25+
},
26+
},
27+
})
28+
```
29+
30+
If you run into any issues, check out the updated [getting started guide](https://park-ui.com/react/docs/overview/getting-started#setup-guide).
31+
932
## [0.43.1] - 2024-11-23
1033

1134
### Fixed

website/src/content/pages/overview/getting-started.mdx

+44-24
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,13 @@ npm install @ark-ui/react
3232
</Step>
3333
<Step number="3" title="Install the Panda Presets">
3434

35-
The next package you will need is `@park-ui/panda-preset`. This package contains all the recipes and tokens explicitly
36-
built for Ark UI's headless components.
35+
The next package you'll need is `@park-ui/panda-preset`. It extends the Panda Base Preset with advanced color options and opinionated design tokens.
3736

3837
```bash
3938
npm install @park-ui/panda-preset -D
4039
```
4140

42-
After you've installed the presets, you'll need to add it to your Panda configuration file along with your preferred
43-
`jsxFramework` like shown below:
41+
Next, update your Panda config file to include the preset and set your preferred `jsxFramework`, as shown below:
4442

4543
```tsx multi
4644
import { defineConfig } from '@pandacss/dev'
@@ -57,7 +55,7 @@ export default defineConfig({
5755
})
5856
```
5957

60-
> Ensure you run `panda codegen` after adding the presets to your Panda configuration file.
58+
> Don't forget to run `panda codegen` after updating your configuration
6159
6260
</Step>
6361
<Step number="4" title="Path Aliases">
@@ -89,47 +87,69 @@ export default defineConfig({
8987

9088
</Step>
9189

92-
<Step number="5" title="Adding Components to Your Project">
90+
<Step number="5" title="Add your first component">
9391

94-
We recommend storing your components in the `~/components/ui` directory.
95-
Here's an example how a project structure might look like:
96-
97-
```bash
98-
➜ /src/components/ui/
99-
|-- styled/
100-
| |-- utils/
101-
| | `-- create-style-context.ts
102-
| `-- button.tsx
103-
`-- button.tsx
104-
```
105-
106-
Although you can manually add components, we recommend using the Park UI CLI for efficiency.
107-
To add a single component, run:
92+
Use the Park UI CLI to add your first component. For example, to add a button, run:
10893

10994
```bash
11095
npx @park-ui/cli components add button
11196
```
11297

113-
If a `park-ui.json` file is not found in your project, the CLI will prompt you to set up the configuration by asking:
98+
If it's your first time running the CLI, you'll be prompted to configure:
11499

115100
```txt
116101
- Which JS framework do you use? [React / Solid / Vue]
117102
- Where would you like to store your components? [./src/components/ui]
103+
- Where would you like to store your recipes? [./src/theme/recipes]
104+
```
105+
106+
After adding the button, your folder structure should resemble this:
107+
108+
```bash
109+
➜ /src/
110+
|-- components/
111+
| `-- ui/
112+
| |-- styled/
113+
| | |-- utils/
114+
| | | `-- create-style-context.ts
115+
| | `-- button.tsx
116+
| `-- button.tsx
117+
`-- theme/
118+
`-- recipes/
119+
|-- button.tsx
120+
`-- index.ts
121+
```
122+
123+
Update the `panda.config.ts` file to include the recipes:
124+
125+
```tsx
126+
// other imports
127+
import { recipes, slotRecipes } from '~/theme/recipes'
128+
129+
export default defineConfig({
130+
// other configuration
131+
theme: {
132+
extend: {
133+
recipes,
134+
slotRecipes,
135+
},
136+
},
137+
})
118138
```
119139
120-
To add multiple components at once, separate their names with spaces:
140+
To add multiple components at once, list them separated by spaces:
121141
122142
```bash
123143
npx @park-ui/cli components add avatar button card
124144
```
125145
126-
To add all available components at once, use the `--all` flag:
146+
Or use the `--all` flag to install all available components:
127147
128148
```bash
129149
npx @park-ui/cli components add --all
130150
```
131151
132-
And that's it! Happy hacking! ✌️
152+
That's it! Happy hacking! ✌️
133153
134154
</Step>
135155
</Steps>

website/src/content/pages/theme/customize.mdx

+11-60
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
---
22
id: customize
33
title: Customize
4-
description: Learn how to customize the Park UI Theme
4+
description: Learn how to customize the Park UI Preset
55
---
66

7-
Depending on your project's needs, you may want to customize the Park UI theme. This guide will walk you through the
8-
different ways you can tailor Park UI to fit your brand.
7+
This guide will walk you through the different ways you can customize Park UI to fit your brand.
98

109
## Presets
1110

12-
Park UI was built with customization in mind. When you integrate the `@park-ui/panda-preset` into your Panda config, it
13-
lets you adjust features like color palettes and border radii to fit your brand.
11+
Park UI was built with customization in mind. By adding the `@park-ui/panda-preset` into your Panda configuration,
12+
you can play with different accent and gray colors and pick a border radii to match your brand.
1413

1514
```tsx
1615
import { defineConfig } from '@pandacss/dev'
@@ -38,19 +37,19 @@ export const coral = {
3837
tokens: defineTokens.colors({
3938
light: {
4039
'1': { value: '#fff8f7' },
41-
// ...
40+
// [2 - 11]
4241
'12': { value: '#762d25' },
4342
},
4443
dark: {
4544
'1': { value: '#1c1412' },
46-
// ...
45+
// [2 - 11]
4746
'12': { value: '#faa19b' },
4847
},
4948
}),
5049

5150
semanticTokens: defineSemanticTokens.colors({
5251
'1': { value: { _light: '{colors.coral.light.1}', _dark: '{colors.coral.dark.1}' } },
53-
// ...
52+
// [2 - 11]
5453
'12': { value: { _light: '{colors.coral.light.12}', _dark: '{colors.coral.dark.12}' } },
5554

5655
default: {
@@ -99,7 +98,7 @@ export default defineConfig({
9998

10099
## Semantic Tokens
101100

102-
Another cool way to customize Park UI is by adjusting
101+
A powerful way to customize Park UI is by adjusting
103102
[semantic tokens](https://park-ui.com/docs/panda/theme/semantic-tokens). This is helpful if you want to modify specific
104103
aspects of the theme, such as the appearance of disabled elements.
105104

@@ -127,56 +126,8 @@ export default defineConfig({
127126

128127
> You don't have to use color tokens. You can also use simple color values like `#000` or `black`.
129128
130-
## Recipes
129+
## Recipes
131130

132-
To customize or enhance a component's style, you want to extend its recipe. In the example below we're extending the
133-
`button` recipe to render all buttons in uppercase.
131+
As of `v0.44`, the `@park-ui/panda-preset` no longer includes component recipes.
132+
Recipes are now added to your project when you install a component, allowing you to fully customize them as needed.
134133

135-
```tsx
136-
import { defineConfig } from '@pandacss/dev'
137-
138-
export default defineConfig({
139-
// ...
140-
theme: {
141-
extend: {
142-
recipes: {
143-
button: {
144-
base: {
145-
textTransform: 'uppercase',
146-
},
147-
},
148-
},
149-
},
150-
},
151-
})
152-
```
153-
154-
You can also add a completly new variant to a component. The following example demonstrates how to add a `primary`
155-
variant to the `button` component.
156-
157-
```tsx
158-
import { defineConfig } from '@pandacss/dev'
159-
160-
export default defineConfig({
161-
// ...
162-
theme: {
163-
extend: {
164-
recipes: {
165-
button: {
166-
variants: {
167-
primary: {
168-
base: {
169-
color: '{colors.white}',
170-
// etc...
171-
},
172-
},
173-
},
174-
},
175-
},
176-
},
177-
},
178-
})
179-
```
180-
181-
Learn more about [recipes](https://panda-css.com/docs/concepts/recipes) and
182-
[slot recipes](https://panda-css.com/docs/concepts/slot-recipes) at Panda CSS.

0 commit comments

Comments
 (0)