Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature Request: Support Data Attributes #39

Open
mutewinter opened this issue Mar 6, 2023 · 1 comment
Open

Feature Request: Support Data Attributes #39

mutewinter opened this issue Mar 6, 2023 · 1 comment

Comments

@mutewinter
Copy link
Contributor

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
Copy link
Contributor Author

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant