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
-**Tailwind CSS v4**: Upgraded from Tailwind CSS v3 to v4. The CSS-based configuration system replaces the old JavaScript preset.
8
+
- Migration steps:
9
+
1.**Update dependencies**
10
+
```bash
11
+
npm install -D tailwindcss@4 @tailwindcss/vite
12
+
npm uninstall autoprefixer postcss
13
+
```
14
+
15
+
2. **Update `vite.config.ts`** — add `@tailwindcss/vite` as a plugin and remove any inline PostCSS Tailwind config
16
+
```ts
17
+
// vite.config.ts
18
+
import tailwindcss from '@tailwindcss/vite'
19
+
20
+
export default defineConfig({
21
+
plugins: [tailwindcss()],
22
+
})
23
+
```
24
+
25
+
3. **Remove the old `@geajs/ui` preset/PostCSS wiring** — delete `postcss.config.js`if it only existed for Tailwind v3, and only remove `tailwind.config.js`if it contained no project-specific configuration
26
+
27
+
4. **Remove `@tailwind` directives** from any CSS files you own (e.g. `@tailwind base; @tailwind components; @tailwind utilities;`). You don't have to `@import "tailwindcss";` in your own CSS, just make sure the theme file is imported first.
28
+
```ts
29
+
// main.ts
30
+
import '@geajs/ui/style.css'
31
+
import './style.css'
32
+
```
33
+
34
+
5. **Remove manual CSS resets** — if your project has a global reset like `* { margin: 0; padding: 0; }` outside a CSS layer, it will silently override Tailwind v4 utilities. In v4, all utilities live inside `@layer utilities`, and unlayered styles always win over layered styles regardless of specificity. Tailwind v4's Preflight already handles these resets inside `@layer base`, so the manual reset is redundant and should be removed
35
+
```css
36
+
/* Remove this — Tailwind v4 Preflight already does it */
37
+
* {
38
+
margin: 0;
39
+
padding: 0;
40
+
box-sizing: border-box;
41
+
}
42
+
```
43
+
44
+
6. **Check [Tailwind CSS upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3)**forneeded changesin your custom components
- Store is imported directly — no prop drilling or context consumers.
556
560
-`<Fragment>` replaced with a wrapper `<div>`.
557
561
- Route-based modal replaced with route params check in the parent `Project` layout.
558
-
-`@geajs/ui``Avatar` replaces custom Avatar with `src`, `name`, and CSS override `class="!h-8 !w-8"`.
562
+
-`@geajs/ui``Avatar` replaces custom Avatar with `src`, `name`, and CSS override `class="h-8! w-8!"`.
559
563
-**Filter function is pure** — defined outside the component, takes all parameters explicitly. Store values are passed in from `template()` to ensure the compiler tracks them.
560
564
561
565
### Gea: Project as a router layout with `page` prop
@@ -814,10 +818,10 @@ Important: `@geajs/ui` Select always uses array values. For single select, wrap
Copy file name to clipboardExpand all lines: docs/gea-ui/getting-started.md
+18-45Lines changed: 18 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,78 +14,51 @@ npm install @geajs/core
14
14
15
15
## Tailwind CSS Setup
16
16
17
-
@geajs/ui uses [Tailwind CSS](https://tailwindcss.com/)**v3** for styling and ships a preset that defines the design token system (colors, border radius, etc.).
17
+
@geajs/ui uses [Tailwind CSS](https://tailwindcss.com/)**v4** for styling. The theme CSS shipped with the library sets up Tailwind and all design tokens.
18
18
19
-
::: warning
20
-
Tailwind CSS v4 is **not yet supported**. Make sure you install Tailwind CSS v3.
21
-
:::
22
-
23
-
### 1. Install Tailwind CSS v3
19
+
### 1. Install Tailwind and its Vite plugin
24
20
25
21
```bash
26
-
npm install -D tailwindcss@3 postcss autoprefixer
27
-
```
28
-
29
-
Create a `postcss.config.js` in your project root:
-**Border radius** — `lg`, `md`, `sm` tokens tied to a single `--radius` variable.
60
-
-**Dark mode** — enabled via the `dark` class strategy.
61
-
62
-
### 3. Import the Theme CSS
36
+
### 2. Import the Theme CSS
63
37
64
-
The theme stylesheet defines the CSS custom properties that the preset references. Import it once in your entry point:
38
+
Import the theme stylesheet once in your entry point. It sets up Tailwind, all semantic color tokens, and dark mode support:
65
39
66
40
```ts
67
41
// main.ts
68
42
import'@geajs/ui/style.css'
69
43
```
70
44
71
-
You also need a CSS file that includes Tailwind's directives. Create a `src/style.css` (or similar) and import it in your entry point:
45
+
### 3. (Optional) Extend with Your Own CSS
46
+
47
+
If you need additional Tailwind utilities or custom styles, create a CSS file and import it after the theme:
72
48
73
49
```css
74
50
/* src/style.css */
75
-
@tailwind base;
76
-
@tailwind components;
77
-
@tailwind utilities;
51
+
/* your custom theme extensions or utilities */
78
52
```
79
53
80
54
```ts
81
55
// main.ts
56
+
// make sure the theme is imported first
82
57
import'@geajs/ui/style.css'
83
58
import'./style.css'
84
59
```
85
60
86
-
### 4. Include @geajs/ui in Tailwind's Content Paths
87
-
88
-
Make sure `node_modules/@geajs/ui/dist/**/*.mjs` is listed in your `content` array (shown above). This allows Tailwind to scan @geajs/ui's component source and include the utility classes they use.
61
+
You don't have to `@import "tailwindcss";` in your CSS file, it is already loaded by the theme.
Copy file name to clipboardExpand all lines: docs/gea-ui/theming.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ The theme stylesheet (`@geajs/ui/style.css`) defines variables in HSL format on
40
40
}
41
41
```
42
42
43
-
Each variable holds the HSL values without the `hsl()` wrapper. The Tailwind preset references them as `hsl(var(--primary))`, so you only need to provide the three numbers (hue, saturation, lightness).
43
+
Each variable holds the HSL values without the `hsl()` wrapper. The theme CSS maps them to Tailwind utilities via `@theme inline` (e.g. `hsl(var(--primary))`), so you only need to provide the three numbers (hue, saturation, lightness).
44
44
45
45
## Available Tokens
46
46
@@ -147,13 +147,14 @@ Styled components also apply semantic class names (`dialog-trigger`, `tabs-conte
147
147
148
148
## Border Radius
149
149
150
-
The `--radius` variable controls the base radius. The Tailwind preset derives three tokens from it:
150
+
The `--radius` variable controls the base radius. The theme derives four tokens from it:
0 commit comments