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
-**extends**: Inherit from base config files (deep merge, last wins)
349
-
-**Responsive typography**: Use arrays with `null` for unchanged breakpoints
364
+
-**Responsive typography/length/shadow**: Use arrays with `null` for unchanged breakpoints
365
+
366
+
### Length & Shadow Token Behavior
367
+
368
+
Length and shadow tokens support responsive arrays like typography. The key distinction is how `$token` behaves depending on syntax:
369
+
370
+
| Syntax | Behavior | Classes |
371
+
|--------|----------|---------|
372
+
|`px="$containerX"`| Expands to all defined breakpoints | Multiple |
373
+
|`px={"$containerX"}`| Expands to all defined breakpoints | Multiple |
374
+
|`px={["$containerX"]}`| Single value at index 0 only | 1 |
375
+
|`px={["8px", null, "$containerX"]}`|`8px` at index 0, token at index 2 | 2 |
376
+
377
+
Both `"$token"` and `{"$token"}` expand the responsive token. Only `{["$token"]}` inside a responsive array keeps it as a single class — because the array itself defines the breakpoint levels.
350
378
351
379
Theme types are auto-generated via module augmentation of `DevupTheme` and `DevupThemeTypography`.
352
380
@@ -415,20 +443,22 @@ DevupUI({
415
443
})
416
444
```
417
445
418
-
## $color Token Scope
446
+
## $token Scope
419
447
420
-
`$color` tokens only work in **JSX props**. Use `var(--color)` in external objects.
448
+
`$token` values (colors, length, shadow) only work in **JSX props**. Use `var(--token)` in external objects.
Copy file name to clipboardExpand all lines: apps/landing/src/app/(detail)/docs/devup/devup-json/page.mdx
+69-4Lines changed: 69 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export const metadata = {
7
7
8
8
# devup.json
9
9
10
-
The `devup.json` file is the configuration file for your Devup UI theme. Create it at the root of your project to define colors, typography, and other design tokens.
10
+
The `devup.json` file is the configuration file for your Devup UI theme. Create it at the root of your project to define colors, typography, length, shadow, and other design tokens.
11
11
12
12
## Basic Structure
13
13
@@ -18,7 +18,13 @@ The `devup.json` file is the configuration file for your Devup UI theme. Create
18
18
"default": {},
19
19
"dark": {}
20
20
},
21
-
"typography": {}
21
+
"typography": {},
22
+
"length": {
23
+
"default": {}
24
+
},
25
+
"shadow": {
26
+
"default": {}
27
+
}
22
28
}
23
29
}
24
30
```
@@ -155,6 +161,53 @@ Typography properties:
155
161
156
162
See [Typography](/docs/devup/typography) for more details.
157
163
164
+
## Length Configuration
165
+
166
+
Define responsive length tokens for spacing, sizing, and other CSS length properties:
Devup UI supports responsive length tokens for spacing, sizing, border-radius, and other CSS length properties. Like typography, length tokens can be defined as responsive arrays in `devup.json`.
0 commit comments