@geckoui/geckoui 2.0.0-beta-0 → 2.0.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 +58 -39
- package/dist/index.d.mts +3254 -1218
- package/dist/index.d.ts +3254 -1218
- package/dist/index.js +6615 -2096
- package/dist/index.mjs +6626 -2106
- package/dist/styles.css +4504 -1940
- package/package.json +31 -25
- package/dist/index.css +0 -16
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
The only thing our Gecko 🦎 eats is bugs! 🐛<br />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
📚 **Documentation**: [Gecko](https://
|
|
11
|
+
📚 **Documentation**: [Gecko](https://geckoui.dev)
|
|
12
|
+
|
|
13
|
+
Upgrading from v1? See the [migration guide](https://geckoui.dev/docs/migrating-to-v2).
|
|
12
14
|
|
|
13
15
|
## Installation
|
|
14
16
|
|
|
@@ -52,7 +54,28 @@ import "@geckoui/geckoui/styles.css";
|
|
|
52
54
|
}
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
### 2.
|
|
57
|
+
### 2. Wrap Your App
|
|
58
|
+
|
|
59
|
+
`GeckoUIProvider` owns the overlay stack. `Toast`, `ConfirmDialog` and the imperative
|
|
60
|
+
`Dialog.show()` / `Drawer.show()` need it; the declarative `<Dialog open>` and
|
|
61
|
+
`<Drawer open>` forms do not. Put it below your own context providers, so content opened
|
|
62
|
+
from anywhere can still read them.
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { GeckoUIProvider } from "@geckoui/geckoui";
|
|
66
|
+
|
|
67
|
+
export default function RootLayout({ children }) {
|
|
68
|
+
return (
|
|
69
|
+
<html lang="en">
|
|
70
|
+
<body>
|
|
71
|
+
<GeckoUIProvider>{children}</GeckoUIProvider>
|
|
72
|
+
</body>
|
|
73
|
+
</html>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 3. Use Components
|
|
56
79
|
|
|
57
80
|
```tsx
|
|
58
81
|
import { Alert, Button, Input } from "@geckoui/geckoui";
|
|
@@ -60,13 +83,13 @@ import { Alert, Button, Input } from "@geckoui/geckoui";
|
|
|
60
83
|
function App() {
|
|
61
84
|
return (
|
|
62
85
|
<div>
|
|
63
|
-
<Button variant="
|
|
86
|
+
<Button variant="filled" color="primary">
|
|
64
87
|
Click me
|
|
65
88
|
</Button>
|
|
66
89
|
|
|
67
90
|
<Input placeholder="Enter your name" />
|
|
68
91
|
|
|
69
|
-
<Alert
|
|
92
|
+
<Alert color="success" title="Operation completed successfully!" />
|
|
70
93
|
</div>
|
|
71
94
|
);
|
|
72
95
|
}
|
|
@@ -74,64 +97,50 @@ function App() {
|
|
|
74
97
|
|
|
75
98
|
## Theming
|
|
76
99
|
|
|
77
|
-
GeckoUI uses
|
|
100
|
+
GeckoUI uses [OKLCH](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/oklch) color values with CSS custom properties (`--color-*`) powered by Tailwind CSS v4. You can override colors using **any CSS color format** — oklch, hex, rgb, hsl, etc.
|
|
78
101
|
|
|
79
|
-
###
|
|
102
|
+
### Dark Mode
|
|
80
103
|
|
|
81
|
-
|
|
104
|
+
Nothing switches on its own. Add the `dark` class above your app — normally `<html>` — or
|
|
105
|
+
every component stays light:
|
|
82
106
|
|
|
83
107
|
```tsx
|
|
84
|
-
|
|
85
|
-
<div className="light">
|
|
86
|
-
<App />
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
// Dark theme
|
|
90
|
-
<div className="dark">
|
|
91
|
-
<App />
|
|
92
|
-
</div>
|
|
93
|
-
|
|
94
|
-
// Custom theme
|
|
95
|
-
<div className="neon">
|
|
96
|
-
<App />
|
|
97
|
-
</div>
|
|
108
|
+
<html lang="en" className="dark">
|
|
98
109
|
```
|
|
99
110
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
- **Light** (default) - Clean, bright interface
|
|
103
|
-
- **Dark** - Easy on the eyes
|
|
111
|
+
On a wrapper instead of the root, it themes only that subtree.
|
|
104
112
|
|
|
105
|
-
###
|
|
113
|
+
### Customizing Colors
|
|
106
114
|
|
|
107
|
-
|
|
115
|
+
Override CSS variables to match your brand:
|
|
108
116
|
|
|
109
117
|
```css
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
118
|
+
:root {
|
|
119
|
+
--color-primary-500: oklch(0.65 0.24 330);
|
|
120
|
+
--color-primary-600: oklch(0.55 0.22 330);
|
|
121
|
+
|
|
122
|
+
/* hex works too */
|
|
123
|
+
--color-primary-700: #6d28d9;
|
|
113
124
|
}
|
|
114
125
|
```
|
|
115
126
|
|
|
116
|
-
Import
|
|
127
|
+
Import after the base styles:
|
|
117
128
|
|
|
118
129
|
```tsx
|
|
119
|
-
import "
|
|
130
|
+
import "@geckoui/geckoui/styles.css";
|
|
120
131
|
|
|
121
|
-
|
|
122
|
-
<App />
|
|
123
|
-
</div>;
|
|
132
|
+
import "./my-theme.css";
|
|
124
133
|
```
|
|
125
134
|
|
|
126
135
|
## Advanced Usage
|
|
127
136
|
|
|
128
|
-
### Custom Styling with
|
|
137
|
+
### Custom Styling with Data Attributes
|
|
129
138
|
|
|
130
|
-
|
|
139
|
+
Components use `data-*` attributes for variant/state styling:
|
|
131
140
|
|
|
132
141
|
```css
|
|
133
|
-
/* Target specific
|
|
134
|
-
.GeckoUIButton
|
|
142
|
+
/* Target specific variants */
|
|
143
|
+
.GeckoUIButton[data-variant="filled"][data-color="primary"] {
|
|
135
144
|
/* Your custom styles */
|
|
136
145
|
}
|
|
137
146
|
|
|
@@ -148,6 +157,16 @@ All components are fully typed. Import types as needed:
|
|
|
148
157
|
import type { ButtonProps, InputProps } from "@geckoui/geckoui";
|
|
149
158
|
```
|
|
150
159
|
|
|
160
|
+
## AI Skills
|
|
161
|
+
|
|
162
|
+
Install the GeckoUI skill to help AI assistants (Claude Code, etc.) generate accurate component code and themes:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
npx skills add GeckoUI/skills
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The skill provides component API references, theming variables, and class name mappings so AI agents can generate correct GeckoUI code without hallucination.
|
|
169
|
+
|
|
151
170
|
## License
|
|
152
171
|
|
|
153
172
|
This project is licensed under the MIT License.
|