Skip to content

Tokens ​

Tokens (or design tokens) are the values used throughout a user interface, like colors or spacing units.

Tokens are separated and queried by namespace, so to use them in utility tags, they need to be in the correct namespace. For example, bg-red-500 and text-red-500 both ingest the color-red-500 token.

When you're defining your own theme's tokens, you'll need to make sure they're in the appropriate namespaces. Below is a reference:

NamespaceUsed in tag prefixesType
alignalignEnum.TextYAlignment
aspectaspectnumber
automatic-sizeautoEnum.AutomaticSize
borderbordernumber
breakpointnonenumber
colorbg, text, border, shadow, fill, stroke, scrollbar-thumbColor3
containerw, min-w, max-w, inline, min-inline, max-inlinenumber
delaydelaynumber
durationtransition, durationnumber
easeeaseEnum.EasingStyle, --direction: Enum.EasingDirection
fill-directionflex, grid, grid-flowEnum.FillDirection
flex-alignmentjustify, content, place-contentEnum.UIFlexAlignment
flex-modeflexEnum.UIFlexMode
flex-wrapflexboolean
fontfontstring (asset ID)
font-weightfontEnum.FontWeight
fractionw, h, sizeUDim2
growgrowEnum.UIFlexMode
hiddenhiddenboolean
horizontal-alignmentjustifyEnum.HorizontalAlignment
inset-shadownonesubtokens: offset Vector2, blur and spread number, color Color3, transparency number
item-alignmentitems, place-items, self, place-selfEnum.ItemLineAlignment
leadingleadingnumber
max-cellsgrid-cols, grid-rowsnumber
objectbg, objectEnum.ScaleType
opacityopacitynumber
orderordernumber
overflowoverflowboolean
place-content-start, place-content-center, place-content-endplace-contentEnum.HorizontalAlignment
pointer-eventspointer-eventsboolean
radiusall 15 rounded* prefixesnumber
rotaterotatenumber
scalescalenumber
shadowshadowboolean; subtokens: offset Vector2, blur and spread number, color Color3, transparency number
shrinkshrinkEnum.UIFlexMode
spacingp, px, py, pt, pr, pb, pl, ps, pe, pbs, pbe, gap, gap-x, gap-y, w, h, size, min-w, min-h, max-w, max-h, inline, block, min-inline, min-block, max-inline, max-block, inset, inset-x, inset-y, top, left, inset-s, inset-bs, translate, translate-x, translate-ynumber
texttextnumber, --line-height: number
text-aligntextEnum.TextXAlignment
text-shadownonesubtokens: offset Vector2, blur number, color Color3, transparency number
text-truncatetext, truncateEnum.TextTruncate
text-wrappedtextboolean
vertical-alignmentcontentEnum.VerticalAlignment
visiblevisibleboolean
whitespacewhitespaceboolean
zznumber