Skip to main content

class and bind-class

Resolve utility classes on one rendered element.

Quick reference​

SyntaxBehavior
classLiteral, space-separated utility string.
bind-classExpression evaluating to a utility string.

Example​

<View class="w-12 h-12 bg-accent" />

Rules and validation​

Do not supply both forms for the same prop. Unknown utilities fail validation. Class order resolves assignments within the supported grammar; control/environment variants have defined precedence. Template invocation classes customize the component root.

Style lesson · Utilities