Смотрите attributify для инструкций по установке.
(variant[:-]{1})*key? = "((variant:)*value)*"
sm = "bg-blue-200 hover:bg-blue-300"
sm:hover = "bg-blue-200 dark:bg-blue-300"
sm-hover = "bg-blue-200 dark:bg-blue-300"
p = "x-4 y-2 md:y-3"
md:bg = "blue-300 dark:blue-400"
md-bg = "blue-300 dark:blue-400"
font = "sans italic leading-3"
значения | свойство |
---|---|
sans, serif, mono | font-family |
italic, not-italic | font-style |
thin, extralight, light, normal, medium, semibold, bold, extrabold, black | font-weight |
antialiased, subpixel-antialiased | font-smoothing |
normal-nums, ordinal, slashed-zero, lining-nums, oldstyle-nums, proportional-nums... | font-variant-numeric |
tracking-tighter,tracking-tight, tracking-normal, ..., tracking-widest | letter-spacing |
leading-none, leading-tight, leading-normal, ..., 0, 1, 2, 3, ... | line-height |
text = "sm gray-900 underline truncate"
значения | свойство |
---|---|
xs, sm, ..., lg | font-size |
left, center, right, justify | text-align |
baseline, top, middle, bottom, text-top, text-bottom | vertical-align |
blue-500, gray-700, ... | color |
opacity-40, ... opacity-90 | opacity |
underline, line-through, no-underline | text-decoration |
underline-green-500, underline-opacity-50, underline-auto, underline-2, underline-offset-auto | text-decoration |
tab, tab-0, tab-2, tab-4 | tab-size |
indent, indent-xs, indent-sm, indent-md | text-indent |
uppercase, lowercase, capitalize, normal-case | text-transform |
stroke, stroke-none, stroke-sm, ... | text-stroke-width |
stroke-transparent, stroke-blue-500, stroke-gray-500, ... | text-stroke-color |
shadow, shadow-sm, shadow-md, shadow-lg, ... | text-stroke-shadow |
truncate, overflow-ellipsis, overflow-clip | text-overflow |
space-normal, space-nowrap, space-pre, space-pre-line, space-pre-wrap | white-space |
break-normal, break-words, break-all | word-break |
write-normal, write-vertical-right, write-vertical-left | writing-mode |
write-orient-mixed, write-orient-upright, write-orient-sideways | writing-orientation |
hyphens-none, hyphens-manual, hyphens-auto | hyphens |
placeholder-blue-500, placeholder-gray-700, ... | placeholder-color |
placeholder-opacity-50, placeholder-opacity-90, ... | placeholder-opacity |
Вы также можете использовать
placeholder = "blue-500 opacity-50"
, но обычно он конфликтует с атрибутом placeholder элемента input, поэтому лучше поместить его в текст, и это тоже имеет смысл.
underline = "~ green-500 opacity-50 2 offset-2"
значения | свойство |
---|---|
~ line-through none | text-decoration |
green-500, current ... | text-decoration-color |
opacity-50, opacity-60 ... | text-decoration-opacity |
auto, 0, 1, 2, 3, 4 ... | text-decoration-thickness |
offset-auto, offset-1, offset-2, ... | text-decoration-offset |
list = "disc inside"
значения | свойство |
---|---|
none, disc, decimal | list-style-type |
inside, outside | list-style-position |
bg = "gray-100 opacity-90"
значения | свойство |
---|---|
fixed, local, scroll | background-attachment |
bottom, center, left, bottom, ... | background-position |
black, white, ... | background-color |
opacity-50, ... | background-opacity |
repeat, no-repeat, repeat-x, ... | background-repeat |
auto, cover, contain | background-size |
clip-border, clip-padding, clip-content, ... | background-clip |
origin-border, origin-padding, origin-content | background-origin |
blend-normal, blend-overlay, blend-draken, ... | background-blend-mode |
none | background-image |
gradient = "to-r from-yellow-400 via-red-500 to-pink-500"
значения | свойство |
---|---|
none, to-t, to-r, to-br, ... | background-image |
from-yellow-400, ... | from-color |
via-red-500, ... | via-color |
to-pink-500, ... | to-color |
border = "~ rounded dashed gray-400 opacity-80"
~ represent border itself, means border-DEFAULT
значения | свойство |
---|---|
~, 1, 2, t-0, ... | border(-top/left/bottom/right)?-width |
rounded-none, rounded-sm, rounded-b-sm, ... | border-radius |
solid, dashed, dotted, double, none | border-style |
collapse, separate | border-collapse |
gray-500, ... | border-color |
opacity-50, ... | border-opacity |
divide = "y dashed gray-800 opacity-90"
значения | свойство |
---|---|
y, x, y-reverse, x-reverse, y-2, ... | divide-width |
solid, dashed, dotted, double, none | divide-style |
gray-500, ... | divide-color |
opacity-90, ... | divide-opacity |
ring = "2 gray-200 opacity-50 offset-1 offset-gray-400"
значения | свойство |
---|---|
~, inset, 0, 1, 2, ... | ring-width |
gray-200, ... | ring-color |
opacity-50, ... | ring-opacity |
offset-4, ... | ring-offset-width |
offset-gray-200, ... | ring-offset-color |
icon = "fill-gray-200 stroke-blue-400 stroke-2"
значения | свойство |
---|---|
fill-current, fill-gray-200, ... | fill |
stroke-current, stroke-gray-400, ... | stroke |
stroke-2, stroke-4, ... | stroke-width |
stroke-dash-2 , stroke-dash-4, ... | stroke-dasharray |
stroke-offset-2, stroke-offset-4, ... | stroke-dashoffset |
stroke-cap-auto , stroke-cap-square.. | stroke-line-cap |
stroke-join-auto, stroke-join-auto... | stroke-line-join |
Вы также можете использовать
stroke = "2 gray-400"
илиfill=gray-200
, но обычно это конфликтует с атрибутом fill/stroke элемента svg, поэтому лучше поместить его в svg.
container = "~"
контейнер всего лишь одной утилитой, вы также можете записать ее в классе attr.
| значения свойство | | :----- | :-------------- | | ~ | width/max-width |
p = "x-2 y-4 md:4"
значения | свойство |
---|---|
0, px, 1, 2, 4... | padding |
y-0, y-px, y-1, y-2, y-4... | padding-top, padding-bottom |
x-0, x-px, x-1, x-2, x-4... | padding-left, padding-right |
t-0, t-px, t-1, t-2, t-4... | padding-top |
l-0, l-px, l-1, l-2, l-4... | padding-left |
b-0, b-px, b-1, b-2, b-4... | padding-bottom |
r-0, r-px, r-1, r-2, r-4... | padding-right |
m = "x-2 y-4 md:4"
значения | свойство |
---|---|
0, px, 1, 2, 4... | margin |
y-0, y-px, y-1, y-2, y-4... | margin-top, margin-bottom |
x-0, x-px, x-1, x-2, x-4... | margin-left, margin-right |
t-0, t-px, t-1, t-2, t-4... | margin-top |
l-0, l-px, l-1, l-2, l-4... | margin-left |
b-0, b-px, b-1, b-2, b-4... | margin-bottom |
r-0, r-px, r-1, r-2, r-4... | margin-right |
space = "x-2 -y-4 y-reverse"
значения | свойство |
---|---|
x-4, -x-4, ... | space-x |
x-reverse | space-x-reverse |
y-2, -y-2, ... | space-y |
y-reverse | space-y-reverse |
w = "2xl md:screen"
значения | свойство |
---|---|
0, auto, px, full, sm, md, screen-sm, ... | width |
min-w = "2xl md:screen"
значения | свойство |
---|---|
0, px, full, sm, md, screen-sm, ... | min-width |
max-w = "2xl md:screen"
значения | свойство |
---|---|
0, px, full, sm, md, screen-sm, ... | max-width |
h = "screen"
значения | свойство |
---|---|
0, auto, px, full, sm, md, screen-sm, ... | height |
min-h = "screen"
значения | свойство |
---|---|
0, px, full, sm, md, screen-sm, ... | min-height |
max-h = "screen"
значения | свойство |
---|---|
0, px, full, sm, md, screen-sm, ... | max-height |
flex = "md:~ col wrap"
значения | свойство |
---|---|
~, inline | display |
row, row-reverse, col, col-reverse | flex-direction |
wrap, wrap-reverse, nowrap | flex-wrap |
1, auto, initial, none | flex |
grow, grow-0 | flex-grow |
shrink, shrink-0 | flex-shrink |
grid = "~ cols-1 lg:cols-3 gap-4"
значения | свойство |
---|---|
~, inline | display |
cols-1, cols-3, cols-none, ... | grid-template-columns |
col-auto, col-span2, ... | grid-column |
rows-1, rows-3, rows-none, ... | grid-template-rows |
flow-row, flow-col, flow-row-dense, flow-col-dense | grid-auto-flow |
auto-cols-auto, auto-cols-min, auto-cols-max, ... | grid-auto-columns |
auto-rows-auto, auto-rows-min, auto-rows-max, ... | gird-auto-rows |
gap-2, gap-x-4, gap-y-2, ... | gap/column-gap/row-gap |
table = "inline column"
значения | свойство |
---|---|
~, inline, caption, cell, column, column-group, footer-group, header-group, row-group, row | display |
auto, fixed | table-layout |
caption-top, caption-bottom | caption-side |
empty-cells-visible, empty-cells-hidden | empty-cells |
order = "first lg:last"
значения | свойство |
---|---|
1, 2, first, last, ... | order |
align = "start md:end"
значения | свойство |
---|---|
(content-)center, (content-)start, (content-)end, (content-)between, (content-)around, (content-)evenly | align-content |
items-start, items-end, items-center, items-baseline, items-stretch | align-items |
self-auto, self-start, self-end, self-center, self-stretch | align-self |
justify = "start md:between"
значения | свойство |
---|---|
(content-)center, (content-)start, (content-)end, (content-)between, (content-)around, (content-)evenly | justify-content |
items-start, items-end, items-center, items-baseline, items-stretch | justify-items |
self-auto, self-start, self-end, self-center, self-stretch | justify-self |
place = "start md:center"
значения | свойство |
---|---|
(content-)center, (content-)start, (content-)end, (content-)between, (content-)around, (content-)evenly, (content-)stretch | place-content |
items-start, items-end, items-center, items-stretch | place-items |
self-auto, self-start, self-end, self-center, self-stretch | place-self |
display = "block md:hidden"
значения | свойство |
---|---|
inline, flow-root, contents, list-item, hidden, block, inline-block | display |
visible, invisible | visibility |
backface-visible, backface-hidden | backface-visibility |
pos = "fixed top-0 left-4"
значения | свойство |
---|---|
static, fixed, absolute, relative, sticky | position |
inset-1, -inset-1, -inset-x-1, -inset-y-2, inset-y-auto | inset |
top-0, left-0, bottom-0, right-0, ... | top/right/bottom/left |
float-right, float-left, float-none | float |
clear-left, clear-right, clear-both, clear-none | clear |
isolate, isolation-auto | isolation |
box = "decoratin-slice content"
значения | свойство |
---|---|
decoration-slice, decoration-clone | box-decoration-break |
border, content | box-sizing |
caret = "gray-500 opacity-50"
значения | свойство |
---|---|
gray-500 transparent ... | caret-color |
opacity-0, opacity-50, ... | caret-opacity |
isolation = "isolate md:auto"
значения | свойство |
---|---|
isolate, auto | isolation |
object = "none center"
значения | свойство |
---|---|
contain, cover, fill, none, scale-down | object-fit |
bottom, center, left, left-bottom, left-top, right, ... | object-position |
overflow = "auto md:scroll"
значения | свойство |
---|---|
auto, hidden, visible, scroll | overflow |
x-auto, x-hidden, x-visible, x-scroll | overflow-x |
y-auto, y-hidden, y-visible, y-scroll | overflow-y |
overscroll = "auto md:contain"
значения | свойство |
---|---|
auto, contain, none | overscroll-behavior |
x-auto, x-contain, x-none | overscroll-behavior-x |
y-auto, y-contain, y-none | overscroll-behavior-y |
z = "0 md:50"
значения | свойство |
---|---|
auto, 0, 10, 20, 50, ... | z-index |
shadow = "md gray-200"
значения | свойство |
---|---|
sm, ~, md, lg, xl, 2xl, inner, none | box-shadow |
gray-200, ... | shadow-color |
opacity = "100 md:50"
значения | свойство |
---|---|
0, 5, 10, 20, ... | opacity |
blend = "darken md:hard-light"
значения | свойство |
---|---|
normal, multiply, screen, overlay, darken, ... | mix-blend-mode |
filter = "~ blur-sm brightness-125"
значения | свойство |
---|---|
~, none | filter |
blur-0, blur-sm, blur, blur-md, ... | blur |
brightness-0, brightness-50, brightness-75, ... | brightness |
contrast-0, contrast-50, contrast-75, ... | contrast |
drop-shadow-sm, drop-shadow, drop-shadow-md, ... | drop-shadow |
grayscale-0, grayscale | grayscale |
-hue-roate-180, -hue-rotate-90, ..., hue-rotate-90, hue-rotate-180 | hue-rotate |
invert-0, invert | invert |
saturate-0, saturate-50, saturate-100, ... | saturate |
sepia-0, sepia | sepia |
backdrop = "~ blur-sm brightness-125"
значения | свойство |
---|---|
~, none | backdrop-filter |
blur-0, blur-sm, blur, blur-md, ... | blur |
brightness-0, brightness-50, brightness-75, ... | brightness |
contrast-0, contrast-50, contrast-75, ... | contrast |
grayscale-0, grayscale | grayscale |
-hue-roate-180, -hue-rotate-90, ..., hue-rotate-90, hue-rotate-180 | hue-rotate |
invert-0, invert | invert |
opacity-0, opacity-5, ... opacity-95 | opacity |
saturate-0, saturate-50, saturate-100, ... | saturate |
sepia-0, sepia | sepia |
transition = "~ duration-500 ease-in-out"
значения | свойство |
---|---|
~, none, all, colors, opacity, shadow, transform | transition-свойство |
duration-75, duration-100, duration-150, ... | transition-duration |
ease-linear, ease-in, ease-out, ease-in-out | transition-timing-function |
delay-75, delay-100, delay-150, ... | transition-delay |
animate = "spin"
значения | свойство |
---|---|
none, spin, ping, pulse, bounce | animation |
transform = "~ rotate-45 lg:none"
значения | свойство |
---|---|
~, gpu, none | transform |
preserve-flat, preserve-3d | transform-style |
perspect-lg, perspect-none, ... | prespective |
perspect-origin-center, perspect-origin-top | perspective-origin |
origin-center, origin-top, origin-top-right, ... | transform-origin |
scale-0, scale-50, scale-75, ... | scale |
scale-x-60, scale-y-30, scale-z-45 | scale-x/y/z |
roate-50, -rotate-50, ... | rotate |
rotate-x-30, rotate-y-45, rotate-z-90 | rotate-x/y/z |
translate-x-2, -translate-x-4, translate-y-40, -translate-y-40, translate-z-12 | translate-x/y/z |
skew-x-2, -skew-x-4, skew-y-2, -skew-y-2 | skew-x/skew-y |
appearance = "none"
| значения свойство | | :----- | :--------- | | none | appearance |
cursor = "pointer"
значения | свойство |
---|---|
auto, default, pointer, wait, text, move, help, not-allowed | cursor |
outline = "none"
значения | свойство |
---|---|
none, white, black | outline |
pointer = "none"
значения | свойство |
---|---|
none, auto | pointer-events |
resize = "~"
значения | свойство |
---|---|
~, x, y, none | resize |
select = "none"
значения | свойство |
---|---|
none, text, all, auto | user-select |
sr = "only"
значения | свойство |
---|---|
only, not-only | screen-reader |
grid table flex ring shadow border filter backdrop transition transform resize
, Эти классы являются частными случаями, **вы не можете записывать пустые значения атрибутов (flex=""
). Вместо этого вы можете написать default
или ~
(flex="~"
или flex="default"
).