You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -77,29 +76,36 @@ import Form from '@rjsf/shadcn';
77
76
or
78
77
79
78
```js
80
-
import {withTheme} from'@rjsf/core';
81
-
import {ThemeasshadcnTheme} from'@rjsf/shadcn';
79
+
import {withTheme} from'@rjsf/core';
80
+
import {ThemeasshadcnTheme} from'@rjsf/shadcn';
82
81
83
82
constForm=withTheme(shadcnTheme);
84
83
```
84
+
85
85
<!-- THEMING -->
86
-
## Theming
87
86
87
+
## Theming
88
88
89
89
### Using Tailwind
90
+
90
91
Follow shadCN installation guide [here](https://ui.shadcn.com/docs/installation) for your application
91
92
92
93
The color of the RJSF will automatically apply with your shadCN config.
93
94
94
95
### Not using Tailwind
96
+
95
97
#### Use the theme on demo site
98
+
96
99
All shadcn's default color theme are included in the npm packages. Simply do
100
+
97
101
```
98
102
import '@rjsf/shadcn/dist/[color].css';
99
103
e.g:
100
104
import '@rjsf/shadcn/dist/zinc.css';
101
105
```
106
+
102
107
Supported colors are:
108
+
103
109
- default
104
110
- zinc
105
111
- red
@@ -109,56 +115,77 @@ Supported colors are:
109
115
- blue
110
116
- yellow
111
117
- violet
118
+
112
119
#### Coloring
113
-
- Generate a theme from [official shadCN site](https://ui.shadcn.com/themes) or [zippy starter's shadcn/ui theme generator](https://zippystarter.com/tools/shadcn-ui-theme-generator) or [Railly](https://customizer.railly.dev/)
120
+
121
+
- Generate a theme from [official shadCN site](https://ui.shadcn.com/themes)
122
+
or [zippy starter's shadcn/ui theme generator](https://zippystarter.com/tools/shadcn-ui-theme-generator)
123
+
or [Railly](https://customizer.railly.dev/)
114
124
- Navigate to shadcn/css, create a new file called [your-theme].css
115
125
- Replace the base layer code with your new color
116
126
- Follow the next section to build your CSS file
127
+
117
128
#### Build your CSS file
129
+
118
130
If you are not using tailwind but still wants to use this theme, you can follow these steps:
131
+
119
132
- Clone the repository
133
+
120
134
```
121
135
cd packages/shadcn
122
136
npm i
123
137
npm run build:css
124
138
```
139
+
125
140
- Include the built file in /dist/rjsf-shadcn.css in your application
126
141
127
142
## Dark mode (Tailwind only)
143
+
128
144
Check out this section by [shadCN](https://ui.shadcn.com/docs/dark-mode)
- Simply copy the shadcn components into shadcn/src/components/ui and rebuilt the packages or using the shadcn CLI at the root level with the components.json
159
-
- For RTL version, you might need component from [here](https://github.com/shadcn-ui/ui/pull/1638) by [nahasco](https://github.com/nahasco)
0 commit comments