Post

Little Tailwind tip — instead of trying merge classes and manage conflicts with `!important`, style things based on data or ARIA attributes and just handle everything declaratively with CSS:

What about handling the state using the "data-..." attribute? Or is there an advantage of using ARIA attributes?

0 reposts1 like

`aria-checked`, `aria-disabled`, `aria-expanded`, `aria-hidden`, `aria-invalid`, `aria-pressed`, `aria-selected` carry state information. If you use them, then adding `data-*` is redundant.