ecklf / tailwindcss-radix

Utilities and variants for styling Radix state
https://tailwindcss-radix.vercel.app
MIT License
2.11k stars 67 forks source link

requesting `peer` variant #11

Closed sudoaugustin closed 2 years ago

sudoaugustin commented 2 years ago

I also have a custom plugin setup like yours. But after I found your plugin, really wanna switch to yours and found peer variant missing. You can find the peer variant of my plugin here.

ecklf commented 2 years ago

Sounds good and we can definitely add that. Just out of curiosity, is there a good use-case for the use of peer with radix primitives?

sudoaugustin commented 2 years ago

This is my use case

I have two sibling dropdown components(Color Picker and Color Swatch) under a div. Instead of adding ring to (Color Picker's trigger and Color Swatch's trigger) when data-state=open, I wanna ring the div. We can't do that with focus:within. So What I need is to create a third sibling component and use peer variant. You can see my use-case sample here.

bla bla bla

ecklf commented 2 years ago

Should be working now. Let me know if you need anything else 🐐

sudoaugustin commented 2 years ago

Thx u so much