Mokshit06 / typewind

The safety of Typescript with the magic of Tailwind.

Home Page:https://typewind.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Support Data Attributes

mutewinter opened this issue · 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.

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