Core concepts
Theme
The named values of the utilities come from the theme. These are the default tokens, read directly from the theme library.
Customize
Add tokens with theme.extend
or replace a category with theme.override
in jx.yaml. Category names are shown under each heading below.
# jx.yaml
content:
- lib
extensions: [dart]
output: web/jx.css
minify: false
reset: true
dark_mode: media
theme:
extend:
colors:
brand: '#2DD4BF'
breakpoints:
3xl: 1920px
Colors
Category colors.
transparent
current
black
white
gray = gray-500
100
300
500
700
900
red = red-500
100
300
500
700
900
orange = orange-500
100
300
500
700
900
yellow = yellow-500
100
300
500
700
900
green = green-500
100
300
500
700
900
teal = teal-500
100
300
500
700
900
blue = blue-500
100
300
500
700
900
indigo = indigo-500
100
300
500
700
900
purple = purple-500
100
300
500
700
900
pink = pink-500
100
300
500
700
900
Spacing
Category spacing.
| Token | Value |
|---|---|
0 |
0px |
px |
1px |
1 |
0.25rem |
2 |
0.5rem |
3 |
0.75rem |
4 |
1rem |
5 |
1.25rem |
6 |
1.5rem |
7 |
1.75rem |
8 |
2rem |
9 |
2.25rem |
10 |
2.5rem |
11 |
2.75rem |
12 |
3rem |
13 |
3.25rem |
14 |
3.5rem |
15 |
3.75rem |
16 |
4rem |
auto |
auto |
Breakpoints
Category breakpoints.
| Token | Value |
|---|---|
sm |
640px |
md |
768px |
lg |
1024px |
xl |
1280px |
2xl |
1536px |
Font families
Category font-family.
| Token | Value |
|---|---|
sans |
ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif |
serif |
ui-serif, Georgia, Cambria, "Times New Roman", serif |
mono |
ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace |
Font sizes
Category font-size.
| Token | Value |
|---|---|
xs |
0.75rem |
sm |
0.875rem |
base |
1rem |
lg |
1.125rem |
xl |
1.25rem |
2xl |
1.5rem |
3xl |
1.875rem |
4xl |
2.25rem |
5xl |
3rem |
6xl |
3.75rem |
Font weights
Category font-weight.
| Token | Value |
|---|---|
thin |
100 |
extralight |
200 |
light |
300 |
normal |
400 |
medium |
500 |
semibold |
600 |
bold |
700 |
extrabold |
800 |
black |
900 |
Line heights
Category line-height.
| Token | Value |
|---|---|
none |
1 |
tight |
1.25 |
snug |
1.375 |
normal |
1.5 |
relaxed |
1.625 |
loose |
2 |
Radii
Category border-radius.
| Token | Value |
|---|---|
none |
0px |
sm |
0.125rem |
md |
0.375rem |
lg |
0.5rem |
xl |
0.75rem |
2xl |
1rem |
3xl |
1.5rem |
full |
9999px |
Border widths
Category border-width.
| Token | Value |
|---|---|
0 |
0px |
1 |
1px |
2 |
2px |
4 |
4px |
8 |
8px |
Opacities
Category opacity.
| Token | Value |
|---|---|
0 |
0 |
5 |
0.05 |
10 |
0.1 |
20 |
0.2 |
30 |
0.3 |
40 |
0.4 |
50 |
0.5 |
60 |
0.6 |
70 |
0.7 |
80 |
0.8 |
90 |
0.9 |
95 |
0.95 |
100 |
1 |
Shadows
Category shadow.
| Token | Value |
|---|---|
sm |
0 1px 2px 0 rgb(0 0 0 / 0.05) |
md |
0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) |
lg |
0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) |
xl |
0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) |
2xl |
0 25px 50px -12px rgb(0 0 0 / 0.25) |
inner |
inset 0 2px 4px 0 rgb(0 0 0 / 0.05) |
none |
none |