typewind icon indicating copy to clipboard operation
typewind copied to clipboard

Feature Request: Support Data Attributes

Open mutewinter opened this issue 1 year ago • 1 comments

Tailwind v3 supports data attributes, e.g.

<div data-size="large" class="data-[size=large]:p-8">
  <!-- ... -->
</div>

These are useful for libraries like Radix UI that uses data attributes for state-based styling.

Perhaps a syntax like tw.data("size=large", tw.p_8) would work.

mutewinter avatar Mar 06 '23 20:03 mutewinter

For Radix UI, I found that https://github.com/ecklf/tailwindcss-radix works perfectly with Typewind.

mutewinter avatar Mar 20 '23 21:03 mutewinter