Skip to content

State Prefixes

Terapkan gaya pada keadaan tertentu

Sintaks

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

Nilai

NilaiCSS OutputHuraian
hover::hoverPada hover
focus::focusPada fokus
active::activePada aktif
disabled::disabledApabila dilumpuhkan
visited::visitedApabila dilawati
first::first-childAnak pertama
last::last-childAnak terakhir
odd::nth-child(odd)Anak ganjil
even::nth-child(even)Anak genap

Contoh

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

Pratonton

Awalan Keadaan

visual="hover:scale:110" - Terapkan gaya pada hover, fokus, dll.

Lihat Kod
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>