Velareference

Utility reference

Every utility class, the exact values it accepts, and what it lowers to.

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.

ElementNotes
frameLayout container
scrollingframeLayout container, plus overscroll-* and the scrolling families
canvasgroupLayout container; opacity-* fades the subtree as one composited layer and stops there
textlabelText properties allowed
textbuttonText properties allowed
textboxText properties allowed, plus placeholder-*
imagelabelimage-* and object-* allowed
imagebuttonimage-* and object-* allowed
Any componentAn 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-utility and writes it anyway. <frame className="text-red-500" /> emits TextColor3 onto 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

ClassValuesRoblox targetNotes
bg-{color}theme color key, [#hex]BackgroundColor3 + BackgroundTransparency
text-{color}theme color key, [#hex]TextColor3 + TextTransparencyFallback branch of text-*
image-{color}theme color key, [#hex]ImageColor3 + ImageTransparency
placeholder-{color}theme color key, [#hex]PlaceholderColor3No transparency channel
border-{color}theme color key, [#hex]UIStroke.Color + UIStroke.TransparencyHelper instance
ring-{color}outline-{color}theme color key, [#hex]UIStroke.Color + UIStroke.TransparencySame UIStroke as border-*
shadow-{color}theme color key, [#hex]UIShadow.ColorHelper instance
inset-shadow-{color}text-shadow-{color}theme color key, [#hex]that layer's UIShadow.ColorSince 0.14.0. A UIShadow of its own
divide-{color}theme color key, [#hex]separator BackgroundColor3 + BackgroundTransparencyruntime
from-{color}via-{color}to-{color}theme color key, [#hex]UIGradient.Color keypoints + UIGradient.TransparencyHelper 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

  • transparent sets the transparency to 1 and removes the color property.
  • On placeholder-* and divide-*, transparent reports unsupported-color-key. divide-white/10 still works.
  • On gradient stops, from-transparent, via-transparent and to-transparent are silently dropped. The stop is missing from the ColorSequence.
  • current and inherit are rejected.

Color diagnostics

MistakeDiagnostic
A palette with no shade and no DEFAULTcolor-missing-shade
A shade on a literal, or a shade the palette lackscolor-invalid-shade
A name not in the themeunknown-theme-key

Border, ring, and outline

ClassValuesRoblox targetNotes
border—UIStroke.Thickness = 1Bare form
border-{n}0, 1, 2, 4UIStroke.ThicknessNo other numbers; use border-[3px]
border-transparent—UIStroke.Transparency = 1
border-{join}round, bevel, miterUIStroke.LineJoinMode
border-{color}theme color key, [#hex]UIStroke.Color, Transparency = 0
ring—UIStroke.Thickness = 3Also sets ApplyStrokeMode = Border
ring-{n}0, 1, 2, 4, 8UIStroke.Thickness
outline—UIStroke.Thickness = 2Also sets ApplyStrokeMode = Border
outline-noneoutline-hidden—UIStroke.Thickness = 0
border-[{n}]ring-[{n}]outline-[{n}]pixels, with or without the unitUIStroke.ThicknessArbitrary 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-* reports unsupported-border-value for dashed, solid, dotted, double, every side form (border-x, border-t-2) and border-opacity-*. Use /N for opacity: border-red-500/50.
  • ring-* and outline-* report unsupported-stroke-value for inset, the four styles, offset-*, and any unbracketed thickness not in the table.

Radius

ClassValuesRoblox targetNotes
rounded—UICorner.CornerRadiusThe theme's DEFAULT radius, 4px by default
rounded-{key}any key in theme.radiusUICorner.CornerRadiusPure theme lookup
rounded-[{n}]pixels, percentUICorner.CornerRadiusArbitrary value, since 0.7.0
rounded-t-{key}rounded-b-{key}any key in theme.radius, or a bracketed valueUICorner.TopLeftRadius + TopRightRadius, BottomLeftRadius + BottomRightRadiusSince 0.13.0. The other pair is squared to 0
rounded-l-{key}rounded-r-{key}any key in theme.radius, or a bracketed valueUICorner.TopLeftRadius + BottomLeftRadius, TopRightRadius + BottomRightRadiusSince 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 valueThe one matching UICorner radius propertySince 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:

Both round the left pair to lg and the right pair to md
<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

ClassValuesRoblox targetNotes
shadow—UIShadow presetblur 3, offset Y 1, spread 0, transparency 0.9
shadow-sm—UIShadow preset2 / 1 / 0 / 0.95
shadow-md—UIShadow preset6 / 4 / −1 / 0.9
shadow-lg—UIShadow preset15 / 10 / −3 / 0.9
shadow-xl—UIShadow preset25 / 20 / −5 / 0.9
shadow-2xl—UIShadow preset50 / 25 / −12 / 0.75
shadow-none—UIShadow.Enabled = false
shadow-{color}theme color key, [#hex]UIShadow.Colorshadow-transparent instead sets Transparency = 1
shadow-inner—UIShadow with Inset = trueSince 0.14.0, the same as inset-shadow-sm
inset-shadow-2xsinset-shadow-xsinset-shadow-sm—UIShadow with Inset = trueSince 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 = TextSince 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.

Gradient

ClassValuesRoblox targetNotes
bg-gradient-to-{dir}t, tr, r, br, b, bl, l, tlUIGradient.RotationRotations 270, 315, 0, 45, 90, 135, 180, 225
bg-linear-to-{dir}samesameAccepted 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

ClassValuesRoblox targetNotes
z-{n}0, 10, 20, 30, 40, 50ZIndexExactly these six
z-[{n}]any non-negative integerZIndexArbitrary value, since 0.7.0

Use z-[15] for a level the presets do not cover. The value must be a whole number.

ClassDiagnostic
z-[1.5]unsupported-arbitrary-z-index
z-autounsupported-z-index-auto
-z-N, -z-[N]unsupported-negative-z-index
Any other unbracketed numberunsupported-z-index-value

Padding

All padding writes into one UIPadding.

ClassValuesRoblox target
p-{key}spacing valuePaddingTop, PaddingRight, PaddingBottom, PaddingLeft
px-{key}spacing valuePaddingLeft, PaddingRight
py-{key}spacing valuePaddingTop, PaddingBottom
pt-{key}spacing valuePaddingTop
pr-{key}spacing valuePaddingRight
pb-{key}spacing valuePaddingBottom
pl-{key}spacing valuePaddingLeft

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 a UDim: w-[50%] is UDim2.fromScale(0.5, 0). A rem uses theme.rem.base and scales with the viewport.
FamilyReads a bracket asExample
Spacing — p-*, m-*, gap-*, space-*Lengthp-[12px], -mt-[8px]
Size — w-*, h-*, size-*, min-*, max-*Lengthw-[120px], h-[50%]
Position — left-*, top-*, inset-*, translate-*Lengthleft-[25%], -left-[10px]
Radius — rounded-*Lengthrounded-[6px]
Scrollbar width — scrollbar-w-*Lengthscrollbar-w-[6px]
text-*Length, read as TextSizetext-[13px]
leading-*Number, read as LineHeightleading-[1.6]
rotate-*Number, read as degreesrotate-[17deg]
z-*Integer, read as ZIndexz-[15]
border-*, ring-*, outline-*Length, read as Thicknessborder-[3px]
aspect-*Ratioaspect-[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.

ClassValuesEffectNotes
m-{key}spacing valuemargin box, all four sidesruntimem-0 emits nothing and stays static
mx-{key}my-{key}spacing valuemargin box, one axisruntime
mt-{key}mr-{key}mb-{key}ml-{key}spacing valuemargin box, one sideruntime
-mt-{key}-ml-{key}spacing valuePosition shiftNegative top/left margins move, not wrap
-mr-{key}-mb-{key}——unsupported-negative-margin
mx-auto—AnchorPoint.X = 0.5, Position.X = 0.5 scaleStatic — centers without a wrapper
my-auto—AnchorPoint.Y = 0.5, Position.Y = 0.5 scaleStatic

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-2 shifts by 8.
  • -ml-2 ml-4 pads by 16.
  • -ml-0 clears 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

ClassValuesRoblox targetNotes
gap-{key}spacing valueUIListLayout.PaddingNo gap-x- or gap-y-. On a grid, CellPadding instead
space-x-{key}spacing valueUIListLayout.Padding + FillDirection = Horizontal
space-y-{key}spacing valueUIListLayout.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.

ClassValuesEffectNotes
divide-xdivide-y—1px separators between children, horizontal / vertical
divide-x-{n}divide-y-{n}0, 1, 2, 4, 8separator thickness0 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.

DiagnosticWhen
divide-without-list-layoutNothing gives the element a list layout, so every separator stacks at the corner. Add flex, flex-col or space-*
divide-with-gridThe element is a grid, so each separator would take a cell
divide-unreadable-orderReact 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

ClassValuesRoblox targetNotes
w-{value}px, full, fractions, spacing offsetsSize X componentMerges with h-
h-{value}px, full, fractions, spacing offsetsSize Y componentMerges with w-
size-{value}px, full, fractions, spacing offsetsboth axes
basis-{value}px, full, fractions, spacing offsetsSize X componentEffectively 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.XYAlso when both axes are set

Accepted values on the sizing axes:

  • px: one pixel of offset.
  • full: scale 1.
  • 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, and 1/12 through 11/12. Unreduced forms such as 2/4 and 3/6 are 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

ClassValuesRoblox target
min-w-{key}spacing offsetUISizeConstraint.MinSize X
min-h-{key}spacing offsetUISizeConstraint.MinSize Y
max-w-{key}spacing offsetUISizeConstraint.MaxSize X
max-h-{key}spacing offsetUISizeConstraint.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

ClassValuesRoblox targetNotes
left-{value}px, full, fractions, spacing offsetsPosition X
top-{value}samePosition Y
right-{value}samePosition X, from the far edgeright-2 is new UDim(1, -8)
bottom-{value}samePosition Y, from the far edge
inset-{value}sameboth axes
-left-{value}-top-{value}-inset-{value}samenegated

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

ClassValuesRoblox targetNotes
origin-{key}top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-rightAnchorPointEmitted as new Vector2(x, y)

Anything outside these nine keys reports unsupported-anchor-value.

Flex layout

These write into a UIListLayout.

ClassRoblox targetNotes
flexFillDirection = Enum.FillDirection.HorizontalBare form. Every form also sets SortOrder = LayoutOrder
flex-rowFillDirection = Enum.FillDirection.Horizontal
flex-colFillDirection = Enum.FillDirection.Vertical
flex-wrapWraps = true
flex-nowrapWraps = false
justify-startjustify-centerjustify-endHorizontalAlignment = Left, Center, Right
justify-betweenjustify-aroundjustify-evenlyHorizontalFlex = Enum.UIFlexAlignment.SpaceBetween, SpaceAround, SpaceEvenlyDifferent property
items-startitems-centeritems-endVerticalAlignment = Top, Center, Bottom
justify-stretchHorizontalFlex = Enum.UIFlexAlignment.FillDifferent property. Since 0.12.7
items-stretchVerticalFlex = Enum.UIFlexAlignment.FillDifferent 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.

ClassRoblox target
flex-1FlexMode = Enum.UIFlexMode.Fill
flex-autoFlexMode = Enum.UIFlexMode.Fill
flex-initialFlexMode = Enum.UIFlexMode.Shrink
flex-noneFlexMode = Enum.UIFlexMode.None
growFlexMode = Enum.UIFlexMode.Grow
grow-0FlexMode = Enum.UIFlexMode.None
shrinkFlexMode = Enum.UIFlexMode.Shrink
shrink-0FlexMode = Enum.UIFlexMode.None
self-{auto,start,center,end,stretch}ItemLineAlignment

There are no numeric grow-{n} or shrink-{n} forms.

Grid

ClassValuesRoblox targetNotes
grid—UIGridLayout child, SortOrder = LayoutOrder
grid-cols-{n}1–12FillDirection = Horizontal, FillDirectionMaxCells = n, CellSize.X
grid-rows-{n}1–12FillDirection = Vertical, FillDirectionMaxCells = n, CellSize.Y
auto-rows-{n}spacing scale, arbitraryCellSize.YCross axis of grid-cols-*
auto-cols-{n}spacing scale, arbitraryCellSize.XCross axis of grid-rows-*
gap-{key}spacing valueCellPaddingSince 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:

grid grid-cols-2 gap-2.5
<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

ClassValuesRoblox target
order-{n}-order-{n}any integerLayoutOrder
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

ClassValuesRoblox targetNotes
aspect-square—UIAspectRatioConstraint.AspectRatio = 1
aspect-video—AspectRatio = 1.7777777778
aspect-[W/H]positive finite numbersAspectRatioArbitrary value
aspect-[N]positive finite numberAspectRatioArbitrary value
aspect-auto——unsupported-aspect-value

Transform

ClassValuesRoblox targetNotes
rotate-{deg}-rotate-{deg}0, 1, 2, 3, 6, 12, 45, 90, 180Rotation-rotate-0 stays 0
scale-{n}0, 50, 75, 90, 95, 100, 105, 110, 125, 150UIScale.ScaleMaps 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 valuesAnchorPoint or PositionA 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:

AnchorPoint (0.5, 0.5) + Position (0.5, 0.5) scale
<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

ClassValuesRoblox targetNotes
opacity-{n}any integer 0–100Every transparency channel the element paints, and the subtree under itInverted: opacity-100 is fully opaque
opacity-{n}any integer 0–100GroupTransparency, on a canvasgroupOne composited layer; the fade stops there
isolate—builds a frame as a canvasgroupSince 0.14.0. Static and unconditional only (isolate-not-static), frame only (isolate-needs-frame)
backdrop-blurbackdrop-blur-xsbackdrop-blur-sm—UIBlur.Strength = LightSince 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:

isolate opacity-75 bg-red-500
<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.

ClassValuesEffectNotes
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 propertiesSince 0.13.0, when transitions began moving the helper instances
transition-none—Disable tweening
duration-{n}preset 75–1000, or any integer msTween time, n / 1000 seconds
delay-{n}preset 75–1000, or any integer msTween delay
ease-{linear,in,out,in-out}—EasingStyle / EasingDirection
animate-{spin,pulse,bounce}—Preset looping animationruntime
animate-none—No animation

The defaults are 0.15 seconds and Quad/Out. Any of duration-*, delay-* or ease-* alone turns the transition on.

A hover transition, complete
<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

ClassValuesRoblox targetNotes
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 128TextSizePixel values shown
font-{weight}thin, extralight, light, normal, medium, semibold, bold, extrabold, blackFontFace weight axisnormal is Regular, black is Heavy
font-{family}any key in theme.fontFamily — sans, serif, mono by defaultFontFace family axisThe fallback branch of font-*
italicnot-italic—FontFace style axisMerges with the weight
leading-{key}none 1, tight 1.25, snug 1.375, normal 1.5, relaxed 1.625, loose 2LineHeightNumeric 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, falseAlias family; others are unsupported-whitespace-value
truncate—TextTruncate = Enum.TextTruncate.AtEnd
uppercaselowercasecapitalizenormal-case—the Text string itselfRewritten at compile time when Text is a literal
underlineline-throughno-underline—RichText markup around TextBacks 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:

font-mono font-bold italic
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

ClassRoblox target
object-coverScaleType = Enum.ScaleType.Crop
object-containScaleType = Enum.ScaleType.Fit
object-fillScaleType = Enum.ScaleType.Stretch
object-tileScaleType = Enum.ScaleType.Tile

object-tile is a Roblox-only addition. Other values report unsupported-object-fit-value.

Interaction

ClassRoblox target
pointer-events-noneInteractable = false
pointer-events-autoInteractable = true
overscroll-autoElasticBehavior = Enum.ElasticBehavior.Always
overscroll-containElasticBehavior = Enum.ElasticBehavior.WhenScrollable
overscroll-noneElasticBehavior = Enum.ElasticBehavior.Never

overscroll-* only works on scrollingframe. Unresolvable values report unsupported-pointer-events-value and unsupported-overscroll-value.

Visibility

ClassRoblox target
hiddenVisible = false
visibleVisible = true

Overflow

ClassRoblox target
overflow-hiddenClipsDescendants = true
overflow-clipClipsDescendants = true
overflow-visibleClipsDescendants = 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.

ClassValuesRoblox targetNotes
scroll-{x,y,xy}—ScrollingDirection = X, Y, XY
scroll-none—ScrollingEnabled = falseDoes not set a direction
scrollbar-w-{n}spacing scale, arbitraryScrollBarThicknessscrollbar-w-2 is 8px
scrollbar-none—ScrollBarThickness = 0
scrollbar-{color}any color, /N modifierScrollBarImageColor3, ScrollBarImageTransparency
canvas-{auto,auto-x,auto-y,none}—AutomaticCanvasSize = XY, X, Y, None
A vertical list that grows its canvas
<scrollingframe className="scroll-y canvas-auto-y scrollbar-w-2 scrollbar-zinc-600/50" />
lowers to
<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.

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.

VariantConditionNotes
sm:md:lg:xl:2xl:Viewport width ≥ 640, 768, 1024, 1280, 1536xl 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 thresholdSince 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 attributeSince 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.
  • hover and active are tracked per element, alongside any handlers you attached. active clears on MouseLeave.
  • focus follows Focused/FocusLost on a textbox, and SelectionGained/SelectionLost elsewhere.
  • dark reads 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:

FamilyWhy there is no equivalent
tracking-*, indent-*, break-*, hyphens-*, list-*The Roblox text engine exposes no letter-spacing, indent, or line-breaking control
decoration-*, overlineNo 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, inlineRoblox 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-pingNeeds 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 plugins for registering utilities of your own.
  • Diagnostics for every warning code named on this page.
  • Recipes for these utilities composed into real interface pieces.