Skip to content

State Prefixes

Apply styles on specific states

Syntax

visual="hover:... focus:... active:..."

Values

ValueCSS OutputDescription
hover::hoverOn hover
focus::focusOn focus
active::activeOn active
disabled::disabledWhen disabled
visited::visitedWhen visited
first::first-childFirst child
last::last-childLast child
odd::nth-child(odd)Odd children
even::nth-child(even)Even children

Examples

html
<button visual="hover:bg:primary focus:outline:primary">Interactive button</button>

Preview

State Prefixes

visual="hover:scale:110" - Apply styles on hover, focus, etc.

View Code
html
<div layout="flex" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <button space="p:small" visual="bg:primary text:white rounded:small transition:all hover:scale:110">hover:scale:110</button>
  <button space="p:small" visual="bg:neutral-500 text:white rounded:small transition:all hover:bg:primary">hover:bg:primary</button>
</div>