@juxtui/ui 0.7.0 → 0.8.0
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 +176 -24
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# juxt.ui
|
|
1
|
+
# juxt.ui
|
|
2
2
|
|
|
3
|
-
**Thoughtfully crafted components for Nuxt & Vue.**
|
|
3
|
+
**Thoughtfully crafted, accessible components for Nuxt & Vue.**
|
|
4
4
|
|
|
5
|
-
juxt
|
|
5
|
+
[Documentation](https://juliuss3722.github.io/juxt-library/) · [Playground](https://juliuss3722.github.io/juxt-library/playground/)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Build with JuxtUI, customize every component in the browser, and copy the generated Vue snippet directly into your project.
|
|
8
|
+
|
|
9
|
+
**44 components. One token system. One motion language.**
|
|
8
10
|
|
|
9
11
|
```vue
|
|
10
12
|
<JButton>
|
|
@@ -12,52 +14,202 @@ It is Multiple components, one token system and one motion language. It's mostly
|
|
|
12
14
|
</JButton>
|
|
13
15
|
```
|
|
14
16
|
|
|
17
|
+
## Why juxt.ui?
|
|
18
|
+
|
|
19
|
+
juxt.ui is a small, polished component library for **Nuxt and Vue 3**.
|
|
20
|
+
|
|
21
|
+
It focuses on the details that make an interface feel good: predictable focus behavior, subtle motion, accessible interactions, consistent tokens, and APIs that stay small.
|
|
22
|
+
|
|
23
|
+
* **Nuxt-first** — automatic components, composables and styles
|
|
24
|
+
* **Accessible by construction** — keyboard navigation, focus management and ARIA patterns
|
|
25
|
+
* **SSR-safe** — designed for Nuxt SSR
|
|
26
|
+
* **Light & dark themes** — built in
|
|
27
|
+
* **Reduced motion** — respects user preferences
|
|
28
|
+
* **Small APIs** — consistent props and `v-model` state
|
|
29
|
+
* **Token-based** — colors, spacing, typography, radius, motion and layering
|
|
30
|
+
* **Tailwind CSS v4 support** — JuxtUI tokens map to utilities
|
|
31
|
+
* **Tree-shakable** — import what you use
|
|
32
|
+
* **MIT licensed**
|
|
33
|
+
|
|
15
34
|
## Installation
|
|
16
35
|
|
|
17
36
|
```bash
|
|
18
37
|
pnpm add @juxtui/ui
|
|
19
38
|
```
|
|
20
39
|
|
|
21
|
-
|
|
40
|
+
### Nuxt
|
|
41
|
+
|
|
42
|
+
Add the JuxtUI module to your `nuxt.config.ts`:
|
|
22
43
|
|
|
23
44
|
```ts
|
|
24
|
-
// nuxt.config.ts
|
|
25
45
|
export default defineNuxtConfig({
|
|
26
46
|
modules: ['@juxtui/ui/nuxt'],
|
|
27
47
|
})
|
|
28
48
|
```
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
Components, composables and styles are wired up automatically.
|
|
51
|
+
|
|
52
|
+
```vue
|
|
53
|
+
<JButton>
|
|
54
|
+
Save changes
|
|
55
|
+
</JButton>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Vue
|
|
59
|
+
|
|
60
|
+
Import the stylesheet once and import the components you use:
|
|
31
61
|
|
|
32
62
|
```ts
|
|
33
63
|
import '@juxtui/ui/style.css'
|
|
64
|
+
|
|
34
65
|
import { JButton, toast } from '@juxtui/ui'
|
|
35
66
|
```
|
|
36
67
|
|
|
37
|
-
|
|
68
|
+
## Playground
|
|
69
|
+
|
|
70
|
+
### Build it. Customize it. Copy the code.
|
|
71
|
+
|
|
72
|
+
The JuxtUI Playground lets you experiment with every component directly in the browser.
|
|
73
|
+
|
|
74
|
+
Change props, variants and content, see the result instantly, and copy the generated Vue snippet into your project.
|
|
75
|
+
|
|
76
|
+
**[Open the JuxtUI Playground →](https://juliuss3722.github.io/juxt-library/playground/)**
|
|
77
|
+
|
|
78
|
+
## Documentation
|
|
79
|
+
|
|
80
|
+
Explore every component, its API, keyboard interactions, accessibility behavior and examples in the full documentation.
|
|
81
|
+
|
|
82
|
+
**[Read the documentation →](https://juliuss3722.github.io/juxt-library/)**
|
|
83
|
+
|
|
84
|
+
## Tailwind CSS v4
|
|
85
|
+
|
|
86
|
+
Using Tailwind CSS v4?
|
|
87
|
+
|
|
88
|
+
Import the JuxtUI Tailwind entrypoint:
|
|
89
|
+
|
|
90
|
+
```css
|
|
91
|
+
@import '@juxtui/ui/tailwind.css';
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
JuxtUI maps its design tokens onto utilities such as:
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
bg-surface
|
|
98
|
+
text-fg-muted
|
|
99
|
+
rounded-md
|
|
100
|
+
duration-fast
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
JuxtUI styles live in their own `juxt` cascade layer, so your application classes can override them naturally.
|
|
38
104
|
|
|
39
105
|
## Components
|
|
40
106
|
|
|
41
|
-
| | |
|
|
42
|
-
|
|
|
43
|
-
| **Actions**
|
|
44
|
-
| **Forms**
|
|
45
|
-
| **Overlays**
|
|
46
|
-
| **Feedback**
|
|
47
|
-
| **Display**
|
|
48
|
-
| **Navigation** | Tabs
|
|
49
|
-
| **Layout**
|
|
50
|
-
| **Editor**
|
|
107
|
+
| Category | Components |
|
|
108
|
+
| -------------- | ------------------------------------------------------------------------------------ |
|
|
109
|
+
| **Actions** | Button |
|
|
110
|
+
| **Forms** | Input · Textarea · Checkbox · Switch · Select |
|
|
111
|
+
| **Overlays** | Dialog · Dropdown Menu · Tooltip · Command Palette |
|
|
112
|
+
| **Feedback** | Toast · Badge |
|
|
113
|
+
| **Display** | Avatar · Card |
|
|
114
|
+
| **Navigation** | Tabs |
|
|
115
|
+
| **Layout** | Navbar · Burger · Footer · Sidebar |
|
|
116
|
+
| **Editor** | Rich text editor with toolbar, selection menu, slash commands and Markdown shortcuts |
|
|
117
|
+
|
|
118
|
+
Every component is designed with:
|
|
119
|
+
|
|
120
|
+
* Light and dark themes
|
|
121
|
+
* Keyboard interaction
|
|
122
|
+
* Reduced-motion support
|
|
123
|
+
* SSR compatibility
|
|
124
|
+
* Accessible focus management
|
|
51
125
|
|
|
52
|
-
|
|
126
|
+
See the documentation for component-specific keyboard shortcuts, ARIA behavior and examples.
|
|
53
127
|
|
|
54
128
|
## Design philosophy
|
|
55
129
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
130
|
+
### Quiet until it matters
|
|
131
|
+
|
|
132
|
+
The interface is primarily grayscale. Green `#079D6B` is reserved for state: focus, checked, success and context.
|
|
133
|
+
|
|
134
|
+
Primary actions use ink rather than turning the entire interface green.
|
|
135
|
+
|
|
136
|
+
### Motion is feedback
|
|
137
|
+
|
|
138
|
+
JuxtUI uses four durations (80–240ms) and three motion curves.
|
|
139
|
+
|
|
140
|
+
Only `transform` and `opacity` are animated where possible. Entrances are slower than exits, and reduced-motion preferences are respected.
|
|
141
|
+
|
|
142
|
+
### Accessible by construction
|
|
143
|
+
|
|
144
|
+
Overlays trap focus, restore it when they close, and stack predictably.
|
|
145
|
+
|
|
146
|
+
When multiple layers are open, Escape and outside clicks affect only the top-most layer.
|
|
147
|
+
|
|
148
|
+
### Small APIs
|
|
149
|
+
|
|
150
|
+
Props describe what components do, and stateful components consistently use `v-model`.
|
|
151
|
+
|
|
152
|
+
If you know one JuxtUI component, the others should feel familiar.
|
|
153
|
+
|
|
154
|
+
### Tokens all the way down
|
|
155
|
+
|
|
156
|
+
Color, typography, spacing, radius, elevation, motion and layering are exposed as CSS custom properties.
|
|
157
|
+
|
|
158
|
+
Change a token such as `--juxt-accent` and the system follows.
|
|
159
|
+
|
|
160
|
+
## Editor
|
|
161
|
+
|
|
162
|
+
JuxtUI also includes a rich text editor with:
|
|
163
|
+
|
|
164
|
+
* Toolbar
|
|
165
|
+
* Selection menu
|
|
166
|
+
* Slash commands
|
|
167
|
+
* Markdown shortcuts
|
|
168
|
+
* Customizable extensions
|
|
169
|
+
|
|
170
|
+
Import it separately:
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
import { JuxtEditor } from '@juxtui/ui/editor'
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Browser support
|
|
177
|
+
|
|
178
|
+
JuxtUI is built for modern browsers and Vue 3 applications.
|
|
179
|
+
|
|
180
|
+
Components are designed to work with both client-side Vue applications and Nuxt SSR.
|
|
181
|
+
|
|
182
|
+
## Development
|
|
183
|
+
|
|
184
|
+
Clone the repository and install dependencies:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
pnpm install
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Run the documentation locally:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
pnpm dev
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Run tests:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
pnpm test
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Build the package:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
pnpm build
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Philosophy
|
|
209
|
+
|
|
210
|
+
juxt.ui intentionally favors **fewer, more polished components** over a large collection of loosely connected primitives.
|
|
211
|
+
|
|
212
|
+
Every component should feel like it belongs to the same system.
|
|
61
213
|
|
|
62
214
|
## License
|
|
63
215
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juxtui/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Accessible, polished UI components for Nuxt & Vue 3.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Julius K.",
|
|
7
7
|
"type": "module",
|
|
@@ -33,10 +33,23 @@
|
|
|
33
33
|
],
|
|
34
34
|
"keywords": [
|
|
35
35
|
"vue",
|
|
36
|
+
"vue3",
|
|
36
37
|
"nuxt",
|
|
37
|
-
"
|
|
38
|
+
"nuxt3",
|
|
39
|
+
"vue-components",
|
|
40
|
+
"nuxt-components",
|
|
41
|
+
"vue-ui",
|
|
42
|
+
"nuxt-ui",
|
|
43
|
+
"ui-library",
|
|
44
|
+
"component-library",
|
|
38
45
|
"design-system",
|
|
39
|
-
"
|
|
46
|
+
"typescript",
|
|
47
|
+
"accessible",
|
|
48
|
+
"accessibility",
|
|
49
|
+
"a11y",
|
|
50
|
+
"tailwind",
|
|
51
|
+
"tailwindcss",
|
|
52
|
+
"dark-mode"
|
|
40
53
|
],
|
|
41
54
|
"peerDependencies": {
|
|
42
55
|
"@nuxt/kit": ">=3.15.0",
|