Every class Vela compiles is on this page. If a class is not here, Vela does not implement it. Diagnostics explains each warning named below.
Each utility lowers to a Roblox property or to a helper instance Vela adds as a child, such as
UIPadding, UIStroke or UICorner. An element gets one of each helper, shared by every class
that targets it: p-4 px-8 makes a single UIPadding. UIShadow is the exception, with
one per layer.
Margins, divide-* and animate-* build wrappers, separators or loops. They move the element onto
the runtime path, even in a
plain string literal. The tables mark them.
Supported elements
Vela lowers className on these eight intrinsic elements, and on components.
| Element | Notes |
|---|---|
frame | Layout container |
scrollingframe | Layout container, plus overscroll-* and the scrolling families |
canvasgroup | Layout container; opacity-* fades the subtree as one composited layer and stops there |
textlabel | Text properties allowed |
textbutton | Text properties allowed |
textbox | Text properties allowed, plus placeholder-* |
imagelabel | image-* and object-* allowed |
imagebutton | image-* and object-* allowed |
| Any component | An uppercase tag (<Panel />) or a member expression (<Switch.Root />). Every utility is allowed |
Any other tag keeps its className untouched and reports classname-on-unsupported-host. That
includes intrinsics such as screengui and namespaced tags such as <svg:rect />.
Text classes (text-*, font-*, leading-*, alignment, wrapping, case, decorations) belong on the
three text hosts. A class on the wrong host behaves differently per path:
- The runtime path drops it.
- The static path warns
unsupported-host-utilityand writes it anyway.<frame className="text-red-500" />emitsTextColor3onto a Frame (still open).
A component gets every utility. It must forward the props it does not use to a host element, and nothing checks that it does. See How it works.
Color
| Class | Values | Roblox target | Notes |
|---|---|---|---|
bg-{color} | theme color key, [#hex] | BackgroundColor3 + BackgroundTransparency | |
text-{color} | theme color key, [#hex] | TextColor3 + TextTransparency | Fallback branch of text-* |
image-{color} | theme color key, [#hex] | ImageColor3 + ImageTransparency | |
placeholder-{color} | theme color key, [#hex] | PlaceholderColor3 | No transparency channel |
border-{color} | theme color key, [#hex] | UIStroke.Color + UIStroke.Transparency | Helper instance |
ring-{color}outline-{color} | theme color key, [#hex] | UIStroke.Color + UIStroke.Transparency | Same UIStroke as border-* |
shadow-{color} | theme color key, [#hex] | UIShadow.Color | Helper instance |
inset-shadow-{color}text-shadow-{color} | theme color key, [#hex] | that layer's UIShadow.Color | Since 0.14.0. A UIShadow of its own |
divide-{color} | theme color key, [#hex] | separator BackgroundColor3 + BackgroundTransparency | runtime |
from-{color}via-{color}to-{color} | theme color key, [#hex] | UIGradient.Color keypoints + UIGradient.Transparency | Helper instance |
A color key is a literal (black, white) or a palette plus a shade from 50 to 950. Vela
splits the shade off at the last - only when it is one of those eleven numbers. So bg-my-color
looks up a single key named my-color.
A bare palette name such as bg-slate resolves to the palette’s DEFAULT. Every built-in palette
has one. A palette of your own needs one too, or the bare form reports color-missing-shade. You
cannot write DEFAULT in a class: bg-slate-DEFAULT looks up a key named slate-DEFAULT.
Hex colors work in every color family: bg-[#3b82f6], text-[#fff]. Any other bracket payload
reports unsupported-arbitrary-value.
Opacity modifiers
Add /N, an integer from 0 to 100, to set that family’s transparency. bg-blue-600/50 writes the
color plus BackgroundTransparency = 0.5.
| Family | /N lowers to |
|---|---|
bg-* | BackgroundTransparency |
text-* | TextTransparency |
image-* | ImageTransparency |
shadow-*, inset-shadow-*, text-shadow-* | that layer’s UIShadow.Transparency |
border-*, ring-*, outline-* | UIStroke.Transparency |
divide-* | the separator frames’ BackgroundTransparency |
from-*, via-*, to-* | a UIGradient.Transparency sequence whose keypoints line up with the color stops |
Each gradient stop fades on its own. placeholder-* has no transparency channel in Roblox, so /N
there reports unsupported-opacity-modifier.
Keywords
transparentsets the transparency to1and removes the color property.- On
placeholder-*anddivide-*,transparentreportsunsupported-color-key.divide-white/10still works. - On gradient stops,
from-transparent,via-transparentandto-transparentare silently dropped. The stop is missing from theColorSequence. currentandinheritare rejected.
Color diagnostics
| Mistake | Diagnostic |
|---|---|
A palette with no shade and no DEFAULT | color-missing-shade |
| A shade on a literal, or a shade the palette lacks | color-invalid-shade |
| A name not in the theme | unknown-theme-key |
Anything after text- that is not a size, alignment or wrap keyword is read as a color. A typo like text-smal reports unknown-theme-key for a color named smal.
Border, ring, and outline
| Class | Values | Roblox target | Notes |
|---|---|---|---|
border | — | UIStroke.Thickness = 1 | Bare form |
border-{n} | 0, 1, 2, 4 | UIStroke.Thickness | No other numbers; use border-[3px] |
border-transparent | — | UIStroke.Transparency = 1 | |
border-{join} | round, bevel, miter | UIStroke.LineJoinMode | |
border-{color} | theme color key, [#hex] | UIStroke.Color, Transparency = 0 | |
ring | — | UIStroke.Thickness = 3 | Also sets ApplyStrokeMode = Border |
ring-{n} | 0, 1, 2, 4, 8 | UIStroke.Thickness | |
outline | — | UIStroke.Thickness = 2 | Also sets ApplyStrokeMode = Border |
outline-noneoutline-hidden | — | UIStroke.Thickness = 0 | |
border-[{n}]ring-[{n}]outline-[{n}] | pixels, with or without the unit | UIStroke.Thickness | Arbitrary value, since 0.7.0. A bracket is read as a color first |
All three families write into one shared UIStroke. They do not stack like CSS rings on borders:
the later class wins. ring and outline also set ApplyStrokeMode = Border.
A bracket is read as a color first, then as a thickness. border-[#0f0] is a color.
border-[3px] and border-[3] are a thickness. See arbitrary values.
Rejected values:
border-*reportsunsupported-border-valuefordashed,solid,dotted,double, every side form (border-x,border-t-2) andborder-opacity-*. Use/Nfor opacity:border-red-500/50.ring-*andoutline-*reportunsupported-stroke-valueforinset, the four styles,offset-*, and any unbracketed thickness not in the table.
Radius
| Class | Values | Roblox target | Notes |
|---|---|---|---|
rounded | — | UICorner.CornerRadius | The theme's DEFAULT radius, 4px by default |
rounded-{key} | any key in theme.radius | UICorner.CornerRadius | Pure theme lookup |
rounded-[{n}] | pixels, percent | UICorner.CornerRadius | Arbitrary value, since 0.7.0 |
rounded-t-{key}rounded-b-{key} | any key in theme.radius, or a bracketed value | UICorner.TopLeftRadius + TopRightRadius, BottomLeftRadius + BottomRightRadius | Since 0.13.0. The other pair is squared to 0 |
rounded-l-{key}rounded-r-{key} | any key in theme.radius, or a bracketed value | UICorner.TopLeftRadius + BottomLeftRadius, TopRightRadius + BottomRightRadius | Since 0.13.0. The other pair is squared to 0 |
rounded-tl-{key}rounded-tr-{key}rounded-bl-{key}rounded-br-{key} | any key in theme.radius, or a bracketed value | The one matching UICorner radius property | Since 0.13.0. Beats rounded-{key} on the corner it names, in either order |
The default keys are DEFAULT (bare rounded), none, xs, sm, md, lg, xl, 2xl,
3xl, 4xl and full. There is no numeric fallback, so rounded-8 is unknown-theme-key. Write
rounded-[8px] instead.
A directional class squares off the corners it does not name, so rounded-r-lg alone leaves the
left side flat. It beats the all-corner shorthand on its corners, in either order:
<frame className="rounded-l-lg rounded-md" /><frame className="rounded-md rounded-l-lg" />A variant can fill in the rest: rounded-l-lg hover:rounded-md.
Shadow
| Class | Values | Roblox target | Notes |
|---|---|---|---|
shadow | — | UIShadow preset | blur 3, offset Y 1, spread 0, transparency 0.9 |
shadow-sm | — | UIShadow preset | 2 / 1 / 0 / 0.95 |
shadow-md | — | UIShadow preset | 6 / 4 / −1 / 0.9 |
shadow-lg | — | UIShadow preset | 15 / 10 / −3 / 0.9 |
shadow-xl | — | UIShadow preset | 25 / 20 / −5 / 0.9 |
shadow-2xl | — | UIShadow preset | 50 / 25 / −12 / 0.75 |
shadow-none | — | UIShadow.Enabled = false | |
shadow-{color} | theme color key, [#hex] | UIShadow.Color | shadow-transparent instead sets Transparency = 1 |
shadow-inner | — | UIShadow with Inset = true | Since 0.14.0, the same as inset-shadow-sm |
inset-shadow-2xsinset-shadow-xsinset-shadow-sm | — | UIShadow with Inset = true | Since 0.14.0. 0 / 1 / 0.95, 1 / 1 / 0.95, 4 / 2 / 0.95. Studio beta |
text-shadow-2xstext-shadow-xstext-shadow-smtext-shadow-mdtext-shadow-lg | — | UIShadow with Mode = Text | Since 0.14.0. Blur 0 / 1 / 2 / 4 / 8. Studio beta |
inset-shadow-nonetext-shadow-none | — | that layer's UIShadow.Enabled = false |
Presets set BlurRadius, Offset, Transparency, and Spread when it is non-zero.
A drop shadow, an inset shadow and a text shadow each get their own UIShadow. So
shadow-md inset-shadow-xs text-shadow-lg puts three on one element. opacity-*,
transition-shadow and rem scaling reach all three.
inset-shadow-* and text-shadow-* have no bare form. text-shadow alone is read as a text color
named shadow. Where Tailwind stacks several text-shadow layers, Vela uses the widest one with
their combined alpha.
Roblox ships both modes in Studio beta. They do not render in a live game until Roblox releases them. Drop shadows are unaffected.
Gradient
| Class | Values | Roblox target | Notes |
|---|---|---|---|
bg-gradient-to-{dir} | t, tr, r, br, b, bl, l, tl | UIGradient.Rotation | Rotations 270, 315, 0, 45, 90, 135, 180, 225 |
bg-linear-to-{dir} | same | same | Accepted alias |
from-{color}via-{color}to-{color} | theme color key, [#hex] | UIGradient.Color |
Rotation is written only when it is non-zero. The element’s BackgroundColor3 is forced to white
so it does not tint the gradient. That overrides any bg-* on the same element. A bad direction
reports unsupported-gradient-direction.
Z-index
| Class | Values | Roblox target | Notes |
|---|---|---|---|
z-{n} | 0, 10, 20, 30, 40, 50 | ZIndex | Exactly these six |
z-[{n}] | any non-negative integer | ZIndex | Arbitrary value, since 0.7.0 |
Use z-[15] for a level the presets do not cover. The value must be a whole number.
| Class | Diagnostic |
|---|---|
z-[1.5] | unsupported-arbitrary-z-index |
z-auto | unsupported-z-index-auto |
-z-N, -z-[N] | unsupported-negative-z-index |
| Any other unbracketed number | unsupported-z-index-value |
Padding
All padding writes into one UIPadding.
| Class | Values | Roblox target |
|---|---|---|
p-{key} | spacing value | PaddingTop, PaddingRight, PaddingBottom, PaddingLeft |
px-{key} | spacing value | PaddingLeft, PaddingRight |
py-{key} | spacing value | PaddingTop, PaddingBottom |
pt-{key} | spacing value | PaddingTop |
pr-{key} | spacing value | PaddingRight |
pb-{key} | spacing value | PaddingBottom |
pl-{key} | spacing value | PaddingLeft |
Spacing values
A spacing key is looked up in theme.spacing first. Otherwise any non-negative multiple of 0.5
becomes new UDim(0, key * 4). So p-1.5 is 6 pixels and p-40 is 160. p-0.25 reports
unknown-theme-key.
The default theme defines only one spacing key, "4". Every other number comes from that rule.
Arbitrary values
A bracket sets a value directly instead of using a scale. There are two kinds:
- Colors:
[#rgb]and[#rrggbb], in every color family. - Lengths:
[16px],[16],[50%],[1rem], and their negatives. A bare number means pixels. A percentage is the scale part of aUDim:w-[50%]isUDim2.fromScale(0.5, 0). Aremusestheme.rem.baseand scales with the viewport.
| Family | Reads a bracket as | Example |
|---|---|---|
Spacing — p-*, m-*, gap-*, space-* | Length | p-[12px], -mt-[8px] |
Size — w-*, h-*, size-*, min-*, max-* | Length | w-[120px], h-[50%] |
Position — left-*, top-*, inset-*, translate-* | Length | left-[25%], -left-[10px] |
Radius — rounded-* | Length | rounded-[6px] |
Scrollbar width — scrollbar-w-* | Length | scrollbar-w-[6px] |
text-* | Length, read as TextSize | text-[13px] |
leading-* | Number, read as LineHeight | leading-[1.6] |
rotate-* | Number, read as degrees | rotate-[17deg] |
z-* | Integer, read as ZIndex | z-[15] |
border-*, ring-*, outline-* | Length, read as Thickness | border-[3px] |
aspect-* | Ratio | aspect-[16/9] |
A payload the family cannot read reports unsupported-arbitrary-value and is dropped. Other
families take no bracket: there is no font-[…], no duration-[…] and no grid template.
A space inside brackets does not split the class. w-[calc(100% - 4px)] is one token with one
diagnostic, since no family reads calc(). An unclosed bracket does split, so the classes after a
typo still apply.
Margin
Roblox has no margins, so Vela wraps the element in a transparent frame padded by the margin. A
positive margin moves the element onto the
runtime path, even in a plain string literal. m-0,
mb-0 and -ml-0 emit nothing and stay static.
| Class | Values | Effect | Notes |
|---|---|---|---|
m-{key} | spacing value | margin box, all four sides | runtimem-0 emits nothing and stays static |
mx-{key}my-{key} | spacing value | margin box, one axis | runtime |
mt-{key}mr-{key}mb-{key}ml-{key} | spacing value | margin box, one side | runtime |
-mt-{key}-ml-{key} | spacing value | Position shift | Negative top/left margins move, not wrap |
-mr-{key}-mb-{key} | — | — | unsupported-negative-margin |
mx-auto | — | AnchorPoint.X = 0.5, Position.X = 0.5 scale | Static — centers without a wrapper |
my-auto | — | AnchorPoint.Y = 0.5, Position.Y = 0.5 scale | Static |
Margins add to the parent’s gap-*. A gap-2 list whose children have my-2 gets 16-pixel gaps,
not 8. For space between list children, use gap-* on the parent instead. It stays on the static
path.
A negative top or left margin shifts the element instead of wrapping it. Each side holds one signed value, and the last class wins:
ml-4 -ml-2shifts by 8.-ml-2 ml-4pads by 16.-ml-0clears what came before it.
The wrapper takes the element’s Size, Position, AnchorPoint, LayoutOrder and ZIndex, and
tweens with it. Variant margins such as mt-2 hover:mt-4 work, but the padding changes instantly.
Gap and space
| Class | Values | Roblox target | Notes |
|---|---|---|---|
gap-{key} | spacing value | UIListLayout.Padding | No gap-x- or gap-y-. On a grid, CellPadding instead |
space-x-{key} | spacing value | UIListLayout.Padding + FillDirection = Horizontal | |
space-y-{key} | spacing value | UIListLayout.Padding + FillDirection = Vertical |
UIListLayout has one padding axis, so there is no gap-x-* or gap-y-*. space-y-2 is exactly
flex flex-col gap-2. An unresolvable value reports unsupported-space-value. space-x-reverse
is not implemented.
On a grid, gap-* sets UIGridLayout.CellPadding instead. See grid.
Divide
divide-* inserts separator frames between the element’s children. Every divide class moves the
element onto the runtime path.
| Class | Values | Effect | Notes |
|---|---|---|---|
divide-xdivide-y | — | 1px separators between children, horizontal / vertical | |
divide-x-{n}divide-y-{n} | 0, 1, 2, 4, 8 | separator thickness | 0 removes the separators |
divide-{color} | theme color key, [#hex] | separator BackgroundColor3 |
Items sit gap + thickness apart, as in CSS. Vela sets the list’s Padding to 0 and gives the gap
to each separator. A Padding you wrote on your own <uilistlayout> is left alone.
Vela overwrites your children’s LayoutOrder. It ranks each child by its declared order, ties
in source order. The child ranked r gets LayoutOrder = 2r and the separator after it 2r + 1.
On React, a component child must forward LayoutOrder to its root.
Separators fade with opacity-* on the element or an ancestor.
| Diagnostic | When |
|---|---|
divide-without-list-layout | Nothing gives the element a list layout, so every separator stacks at the corner. Add flex, flex-col or space-* |
divide-with-grid | The element is a grid, so each separator would take a cell |
divide-unreadable-order | React only. A child’s order-* sits under a variant, in a class value branch, or in a class value left to the runtime. The parent ranks by the static order instead |
An unresolvable payload reports unsupported-divide-value.
Size
| Class | Values | Roblox target | Notes |
|---|---|---|---|
w-{value} | px, full, fractions, spacing offsets | Size X component | Merges with h- |
h-{value} | px, full, fractions, spacing offsets | Size Y component | Merges with w- |
size-{value} | px, full, fractions, spacing offsets | both axes | |
basis-{value} | px, full, fractions, spacing offsets | Size X component | Effectively w-* regardless of fill direction |
w-autow-fit | — | AutomaticSize = Enum.AutomaticSize.X | |
h-autoh-fit | — | AutomaticSize = Enum.AutomaticSize.Y | |
size-autosize-fit | — | AutomaticSize = Enum.AutomaticSize.XY | Also when both axes are set |
Accepted values on the sizing axes:
px: one pixel of offset.full: scale1.- Fractions from a fixed list:
1/2,1/3,2/3,1/4,3/4,1/5,2/5,3/5,4/5,1/6,5/6, and1/12through11/12. Unreduced forms such as2/4and3/6are rejected. - Any spacing value, as an offset. A spacing value with a non-zero scale reports
unsupported-size-spacing-value.
w- and h- merge into one Size. Vela emits UDim2.fromOffset, UDim2.fromScale or
UDim2.new, whichever the values need.
basis-* is w-* under another name. It sets the X axis whatever the fill direction.
Constraints
| Class | Values | Roblox target |
|---|---|---|
min-w-{key} | spacing offset | UISizeConstraint.MinSize X |
min-h-{key} | spacing offset | UISizeConstraint.MinSize Y |
max-w-{key} | spacing offset | UISizeConstraint.MaxSize X |
max-h-{key} | spacing offset | UISizeConstraint.MaxSize Y |
Emitted as new Vector2(x, y). An unset axis defaults to 0 for MinSize and math.huge for
MaxSize. Offsets only: no fractions, no full.
Position
| Class | Values | Roblox target | Notes |
|---|---|---|---|
left-{value} | px, full, fractions, spacing offsets | Position X | |
top-{value} | same | Position Y | |
right-{value} | same | Position X, from the far edge | right-2 is new UDim(1, -8) |
bottom-{value} | same | Position Y, from the far edge | |
inset-{value} | same | both axes | |
-left-{value}-top-{value}-inset-{value} | same | negated |
Fractions use the same list as sizing.
right-* and bottom-* measure from the far edge but do not change AnchorPoint. Pair them with
origin-*: right-2 bottom-2 origin-bottom-right puts the bottom-right corner 8 pixels inside the
parent’s.
These classes do nothing under a parent with a UIListLayout, which any flex, gap-* or
space-* creates. The layout owns its children’s positions.
Anchor
| Class | Values | Roblox target | Notes |
|---|---|---|---|
origin-{key} | top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right | AnchorPoint | Emitted as new Vector2(x, y) |
Anything outside these nine keys reports unsupported-anchor-value.
Flex layout
These write into a UIListLayout.
| Class | Roblox target | Notes |
|---|---|---|
flex | FillDirection = Enum.FillDirection.Horizontal | Bare form. Every form also sets SortOrder = LayoutOrder |
flex-row | FillDirection = Enum.FillDirection.Horizontal | |
flex-col | FillDirection = Enum.FillDirection.Vertical | |
flex-wrap | Wraps = true | |
flex-nowrap | Wraps = false | |
justify-startjustify-centerjustify-end | HorizontalAlignment = Left, Center, Right | |
justify-betweenjustify-aroundjustify-evenly | HorizontalFlex = Enum.UIFlexAlignment.SpaceBetween, SpaceAround, SpaceEvenly | Different property |
items-startitems-centeritems-end | VerticalAlignment = Top, Center, Bottom | |
justify-stretch | HorizontalFlex = Enum.UIFlexAlignment.Fill | Different property. Since 0.12.7 |
items-stretch | VerticalFlex = Enum.UIFlexAlignment.Fill | Different property |
content-{start,center,end} | VerticalAlignment | |
content-{between,around,evenly,stretch} | VerticalFlex |
justify-* and items-* follow Roblox’s horizontal and vertical axes, not the flex main and cross
axes. They do not swap under flex-col. Likewise items-stretch writes VerticalFlex and
justify-stretch writes HorizontalFlex.
An unknown flex-* reports unsupported-flex-direction. An unresolvable justify-*, items-* or
content-* reports unsupported-alignment-value.
Flex items
These write into a UIFlexItem on the child.
| Class | Roblox target |
|---|---|
flex-1 | FlexMode = Enum.UIFlexMode.Fill |
flex-auto | FlexMode = Enum.UIFlexMode.Fill |
flex-initial | FlexMode = Enum.UIFlexMode.Shrink |
flex-none | FlexMode = Enum.UIFlexMode.None |
grow | FlexMode = Enum.UIFlexMode.Grow |
grow-0 | FlexMode = Enum.UIFlexMode.None |
shrink | FlexMode = Enum.UIFlexMode.Shrink |
shrink-0 | FlexMode = Enum.UIFlexMode.None |
self-{auto,start,center,end,stretch} | ItemLineAlignment |
There are no numeric grow-{n} or shrink-{n} forms.
Grid
| Class | Values | Roblox target | Notes |
|---|---|---|---|
grid | — | UIGridLayout child, SortOrder = LayoutOrder | |
grid-cols-{n} | 1–12 | FillDirection = Horizontal, FillDirectionMaxCells = n, CellSize.X | |
grid-rows-{n} | 1–12 | FillDirection = Vertical, FillDirectionMaxCells = n, CellSize.Y | |
auto-rows-{n} | spacing scale, arbitrary | CellSize.Y | Cross axis of grid-cols-* |
auto-cols-{n} | spacing scale, arbitrary | CellSize.X | Cross axis of grid-rows-* |
gap-{key} | spacing value | CellPadding | Since 0.14.0 no second UIListLayout. gap-[10%] still falls back to one |
UIGridLayout has no spans, so col-span-*, row-span-* and templates are not implemented. An
unresolvable count reports unsupported-grid-value.
grid-cols-N sizes the cells. The layout ignores each child’s own Size, so Vela splits the axis
into N tracks, each taking its share of the gap:
<uigridlayout FillDirection={Enum.FillDirection.Horizontal} FillDirectionMaxCells={2} CellSize={new UDim2(0.5, -5, 0, 100)} CellPadding={UDim2.fromOffset(10, 10)}/>The other axis stays at Roblox’s default 100px until auto-rows-* sets it (auto-cols-* for
grid-rows-*). Both read the spacing scale, so auto-rows-24 is 96px.
Variant gaps and tracks reflow the grid: grid grid-cols-3 md:gap-4 works. A gap that
CellPadding cannot hold, such as gap-[10%], falls back to a UIListLayout beside the grid.
Order
| Class | Values | Roblox target |
|---|---|---|
order-{n}-order-{n} | any integer | LayoutOrder |
order-first | — | LayoutOrder = -9999 |
order-last | — | LayoutOrder = 9999 |
order-none | — | LayoutOrder = 0 |
order-* only works under a layout that sorts by LayoutOrder. Vela’s flex and grid layouts
do. A layout you wrote yourself keeps Roblox’s default sort by Name and ignores order-*.
An unresolvable payload reports unsupported-layout-order-value. Under a divide-* parent, see
divide.
Aspect ratio
| Class | Values | Roblox target | Notes |
|---|---|---|---|
aspect-square | — | UIAspectRatioConstraint.AspectRatio = 1 | |
aspect-video | — | AspectRatio = 1.7777777778 | |
aspect-[W/H] | positive finite numbers | AspectRatio | Arbitrary value |
aspect-[N] | positive finite number | AspectRatio | Arbitrary value |
aspect-auto | — | — | unsupported-aspect-value |
Transform
| Class | Values | Roblox target | Notes |
|---|---|---|---|
rotate-{deg}-rotate-{deg} | 0, 1, 2, 3, 6, 12, 45, 90, 180 | Rotation | -rotate-0 stays 0 |
scale-{n} | 0, 50, 75, 90, 95, 100, 105, 110, 125, 150 | UIScale.Scale | Maps to 0, 0.5, 0.75, 0.9, 0.95, 1, 1.05, 1.1, 1.25, 1.5 |
translate-x-{v}translate-y-{v} | fractions or spacing values | AnchorPoint or Position | A fraction anchors; a pixel value shifts |
Scaling is uniform: there is no scale-x-* or scale-y-*. Other degrees report
unsupported-rotation-value, and other scales unsupported-scale-value.
translate-* with a fraction sets AnchorPoint, a shift measured in the element’s own size. With
a pixel value it adds to the Position offset. So the CSS centering idiom works as written:
<frame className="left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />mx-auto and my-auto compile to the same centering.
Effects
| Class | Values | Roblox target | Notes |
|---|---|---|---|
opacity-{n} | any integer 0–100 | Every transparency channel the element paints, and the subtree under it | Inverted: opacity-100 is fully opaque |
opacity-{n} | any integer 0–100 | GroupTransparency, on a canvasgroup | One composited layer; the fade stops there |
isolate | — | builds a frame as a canvasgroup | Since 0.14.0. Static and unconditional only (isolate-not-static), frame only (isolate-needs-frame) |
backdrop-blurbackdrop-blur-xsbackdrop-blur-sm | — | UIBlur.Strength = Light | Since 0.14.0. Needs @rbxts/types 1.0.958 |
backdrop-blur-mdbackdrop-blur-lg | — | UIBlur.Strength = Medium | |
backdrop-blur-xlbackdrop-blur-2xlbackdrop-blur-3xl | — | UIBlur.Strength = Heavy | |
backdrop-blur-none | — | UIBlur.Enabled = false |
opacity-75 sets a transparency of 0.25. A non-integer or out-of-range value reports
unsupported-opacity-value.
opacity-* fades everything the element draws: background, text, image, and any UIStroke,
UIShadow or UIBlur from the same class list.
It also fades the subtree. Each descendant’s transparency becomes 1 - (1 - own) * alpha. That
includes children inside expressions, {props.children}, and component children, which the alpha
reaches through React context.
A canvasgroup stops it.
It multiplies with /N, in any order. opacity-50 bg-blue-600/50 gives a transparency of 0.75.
Use /N to fade one family and opacity-* to fade the element and its subtree.
A transparency you set yourself is kept. <frame BackgroundTransparency={0.2} /> under an
ancestor’s opacity-50 stays at 0.2.
Unlike CSS, overlapping siblings fade one by one, so their overlap looks darker. Use isolate for
a true composite.
isolate
isolate on a frame builds it as a canvasgroup. opacity-* then sets GroupTransparency, and
the subtree fades as one layer, as in CSS:
<canvasgroup BackgroundColor3={Color3.fromRGB(251, 44, 54)} GroupTransparency={0.25} BorderSizePixel={0} />A CanvasGroup costs more. It clips its descendants, re-renders them to a texture on every change,
and is what a ref or an IsA check sees.
isolate must be static and unconditional. Under a variant or in a class value it reports
isolate-not-static. On anything but a frame it reports isolate-needs-frame.
Backdrop blur
backdrop-blur-* lowers to Roblox’s UIBlur, which has three strengths. The table above shows how
Tailwind’s sizes map onto them.
Any other size, backdrop-blur-[3px] included, reports unsupported-backdrop-blur-value. Other
backdrop-* filters are no-roblox-equivalent. opacity-* fades the blur, and
hover:backdrop-blur-xl changes the strength.
A static backdrop-blur-* needs @rbxts/types 1.0.958 or later to typecheck. Roblox has not
documented UIBlur yet. The mapping assumes it blurs what is behind its parent, and has not been
checked in Studio.
Motion
Transitions and animations run on TweenService in the runtime helper.
| Class | Values | Effect | Notes |
|---|---|---|---|
transition | — | Tween property changes caused by variant rules | |
transition-all | — | Tween every property a rule changes | |
transition-colors | — | Narrow the tween to the color properties | |
transition-opacity | — | Narrow the tween to the transparency properties | |
transition-transform | — | Narrow the tween to Position, Rotation, UIScale | |
transition-shadow | — | Narrow the tween to the UIShadow properties | Since 0.13.0, when transitions began moving the helper instances |
transition-none | — | Disable tweening | |
duration-{n} | preset 75–1000, or any integer ms | Tween time, n / 1000 seconds | |
delay-{n} | preset 75–1000, or any integer ms | Tween delay | |
ease-{linear,in,out,in-out} | — | EasingStyle / EasingDirection | |
animate-{spin,pulse,bounce} | — | Preset looping animation | runtime |
animate-none | — | No animation |
The defaults are 0.15 seconds and Quad/Out. Any of duration-*, delay-* or ease-* alone
turns the transition on.
<textbutton className="bg-sky-500 hover:bg-sky-600 transition duration-150" Text="Play" />A transition needs a property that changes, from a
variant or a dynamic className. On a static
element it is dropped with transition-without-runtime. On a component, motion classes report
motion-on-component.
The filters limit what tweens. Under transition-colors, a rule changing color and position tweens
the color and snaps the position. Helper instances tween too, so hover:rounded-xl and
hover:border-blue-500 animate.
An unresolvable value reports unsupported-transition-value or unsupported-animation-value. A
motion driver can replace TweenService.
Typography
| Class | Values | Roblox target | Notes |
|---|---|---|---|
text-{size} | xs 12, sm 14, base 16, lg 18, xl 20, 2xl 24, 3xl 30, 4xl 36, 5xl 48, 6xl 60, 7xl 72, 8xl 96, 9xl 128 | TextSize | Pixel values shown |
font-{weight} | thin, extralight, light, normal, medium, semibold, bold, extrabold, black | FontFace weight axis | normal is Regular, black is Heavy |
font-{family} | any key in theme.fontFamily — sans, serif, mono by default | FontFace family axis | The fallback branch of font-* |
italicnot-italic | — | FontFace style axis | Merges with the weight |
leading-{key} | none 1, tight 1.25, snug 1.375, normal 1.5, relaxed 1.625, loose 2 | LineHeight | Numeric forms are unsupported-line-height-value |
text-lefttext-centertext-right | — | TextXAlignment | |
text-justify | — | — | unsupported-text-alignment |
align-topalign-middlealign-bottom | — | TextYAlignment = Top, Center, Bottom | |
text-wraptext-nowrap | — | TextWrapped = true, false | |
whitespace-normalwhitespace-nowrap | — | TextWrapped = true, false | Alias family; others are unsupported-whitespace-value |
truncate | — | TextTruncate = Enum.TextTruncate.AtEnd | |
uppercaselowercasecapitalizenormal-case | — | the Text string itself | Rewritten at compile time when Text is a literal |
underlineline-throughno-underline | — | RichText markup around Text | Backs off with decoration-on-richtext if you set RichText |
font-* covers weight, family and style, merged into one FontFace. Weight names are checked
first. Anything else is a key in theme.fontFamily:
FontFace={new Font("rbxasset://fonts/families/RobotoMono.json", Enum.FontWeight.Bold, Enum.FontStyle.Italic)}The style argument appears only with italic. Because the family lookup comes last, a bad font-*
reports unknown-theme-key. The default families are sans (Source Sans Pro), serif
(Merriweather) and mono (Roboto Mono). Any Roblox font asset works, uploaded ones included.
Case transforms rewrite the Text string. With a literal it happens at compile time:
<textlabel className="uppercase" Text="hello" /> emits Text="HELLO". With an expression, the
runtime helper does it.
Decorations wrap Text in RichText tags and set RichText={true}. underline emits
Text="<u>hello</u>". If you set RichText yourself, Vela skips the decoration and reports
decoration-on-richtext.
Images
| Class | Roblox target |
|---|---|
object-cover | ScaleType = Enum.ScaleType.Crop |
object-contain | ScaleType = Enum.ScaleType.Fit |
object-fill | ScaleType = Enum.ScaleType.Stretch |
object-tile | ScaleType = Enum.ScaleType.Tile |
object-tile is a Roblox-only addition. Other values report unsupported-object-fit-value.
Interaction
| Class | Roblox target |
|---|---|
pointer-events-none | Interactable = false |
pointer-events-auto | Interactable = true |
overscroll-auto | ElasticBehavior = Enum.ElasticBehavior.Always |
overscroll-contain | ElasticBehavior = Enum.ElasticBehavior.WhenScrollable |
overscroll-none | ElasticBehavior = Enum.ElasticBehavior.Never |
overscroll-* only works on scrollingframe. Unresolvable values report
unsupported-pointer-events-value and unsupported-overscroll-value.
Visibility
| Class | Roblox target |
|---|---|
hidden | Visible = false |
visible | Visible = true |
Overflow
| Class | Roblox target |
|---|---|
overflow-hidden | ClipsDescendants = true |
overflow-clip | ClipsDescendants = true |
overflow-visible | ClipsDescendants = false |
Other values report unsupported-overflow-value. There is no overflow-auto or overflow-scroll.
Use a scrollingframe with the scrolling families.
Scrolling
These four families only work on scrollingframe.
| Class | Values | Roblox target | Notes |
|---|---|---|---|
scroll-{x,y,xy} | — | ScrollingDirection = X, Y, XY | |
scroll-none | — | ScrollingEnabled = false | Does not set a direction |
scrollbar-w-{n} | spacing scale, arbitrary | ScrollBarThickness | scrollbar-w-2 is 8px |
scrollbar-none | — | ScrollBarThickness = 0 | |
scrollbar-{color} | any color, /N modifier | ScrollBarImageColor3, ScrollBarImageTransparency | |
canvas-{auto,auto-x,auto-y,none} | — | AutomaticCanvasSize = XY, X, Y, None |
<scrollingframe className="scroll-y canvas-auto-y scrollbar-w-2 scrollbar-zinc-600/50" /><scrollingframe ScrollingDirection={Enum.ScrollingDirection.Y} ScrollBarThickness={8} ScrollBarImageTransparency={0.5} ScrollBarImageColor3={Color3.fromRGB(82, 82, 92)} AutomaticCanvasSize={Enum.AutomaticSize.Y}/>Without canvas-*, the canvas keeps whatever CanvasSize the element declares, and the scrollbar
has nothing to scroll.
Tailwind’s own scroll-* utilities, such as scroll-smooth and scroll-m-*, are not implemented.
They report unsupported-scroll-value, which lists the values that work.
<frame className="scroll-y" /> writes ScrollingDirection onto a Frame, and Roblox rejects it at runtime. Only the editor and the runtime path catch it.
Variants
Chain variants with colons. Every condition must hold: md:touch:w-full applies only on a wide
touch screen. An unknown prefix reports unknown-variant and drops the token.
| Variant | Condition | Notes |
|---|---|---|
sm:md:lg:xl:2xl: | Viewport width ≥ 640, 768, 1024, 1280, 1536 | xl and 2xl since 0.13.0. Every threshold is a theme.screens key |
max-sm:max-md:max-lg:max-xl:max-2xl: | Viewport width < the same threshold | Since 0.13.0. The exact complement of the bare form, so the two cover every viewport once. Chains, as md:max-lg: |
attr-[{Name}={value}]: | The styled instance carries that Roblox attribute | Since 0.13.0. addVariant() registers the same condition under a name |
portrait: | Viewport width less than height | |
landscape: | Viewport width ≥ height | |
touch: | UserInputService.TouchEnabled, and no gamepad | |
mouse: | Neither gamepad nor touch | |
gamepad: | UserInputService.GamepadEnabled | |
hover: | The pointer is over this element | |
active: | This element is being pressed | |
focus: | This element holds focus or selection | |
dark: | Players.LocalPlayer carries VelaColorScheme = "dark" |
Breakpoints come from theme.screens, so a custom
tablet: is one line of config. max-* is the exact complement of the bare form (minimum
inclusive, maximum exclusive). They combine: md:max-lg:. max- on something that is not a
breakpoint reports unknown-breakpoint. A range that matches no viewport reports
invalid-breakpoint-range.
attr-[State=open]: matches a Roblox attribute on the styled instance.
addVariant gives the same condition a name. A
malformed attr-[…] reports malformed-attribute-variant.
How the built-in conditions behave:
- A square viewport counts as
landscape. - Exactly one input mode is active, by priority: gamepad, then touch, then mouse.
hoverandactiveare tracked per element, alongside any handlers you attached.activeclears onMouseLeave.focusfollowsFocused/FocusLoston atextbox, andSelectionGained/SelectionLostelsewhere.darkreads an attribute your app sets. Roblox exposes no color scheme.
There are no structural variants (first:, last:) and no disabled:. Any variant moves the
element onto the runtime path. See
Responsive and input variants for the cost and
for how to drive dark:.
Not implemented
An unknown family, typos included, reports unsupported-utility-family. A real Tailwind family
with no Roblox equivalent reports no-roblox-equivalent. This list is permanent:
| Family | Why there is no equivalent |
|---|---|
tracking-*, indent-*, break-*, hyphens-*, list-* | The Roblox text engine exposes no letter-spacing, indent, or line-breaking control |
decoration-*, overline | No RichText equivalent (underline and line-through do exist) |
blur-*, backdrop-* other than backdrop-blur-*, grayscale, invert, sepia, contrast-* | No per-element filters — BlurEffect is camera-global, and UIBlur only blurs what is behind |
brightness-*, fill-*, stroke-* | Deliberately excluded; an ImageColor3 approximation would mislead |
skew-*, perspective-* | Roblox UI is strictly 2D |
static, fixed, absolute, relative, sticky, block, inline | Roblox positioning is always parent-relative; there is no positioning model to switch |
float, clear, columns-*, col-span-*, row-span-* | UIGridLayout has no span or flow concept |
cursor-*, caret-*, accent-*, select-*, snap-*, resize-* | No property to target |
Tailwind’s scroll-* (scroll-smooth, scroll-m-*) | The prefix is taken by the scrolling families; reports unsupported-scroll-value |
ms-*, me-* | No logical-direction margins |
animate-ping | Needs a cloned element; the other animate-* presets exist |
A family that exists but rejects a value has its own diagnostic, listed in its section above.
Dynamic class names
When className is not a compile-time constant, the runtime helper resolves it. Every family on
this page works there, with the same results.
One difference: the runtime path drops a utility the host cannot carry, because assigning
TextColor3 to a Frame is a Roblox error. The static path writes it anyway. See
supported elements.
An opacity-* inside a variant fades the subtree it is written over.
Dynamic class names covers the cost and what moves an element onto this path.
See also
- Configuration for the theme keys these utilities look up, and
pluginsfor registering utilities of your own. - Diagnostics for every warning code named on this page.
- Recipes for these utilities composed into real interface pieces.