tailwindcss-labeled-groups icon indicating copy to clipboard operation
tailwindcss-labeled-groups copied to clipboard

Using group names without state?

Open christianmagill opened this issue 3 years ago • 2 comments

I'd love to use the labeled groups without a state.

I'd use JavaScript to toggle the necessary group classes and then reference that group in child elements.

<ul>
  <li class="group-active-item">
     <div class="group-active-item:text-blue-500">Title</div>
     <div class="hidden group-active-item:block">Content</div>
  </li>
</ul>

christianmagill avatar May 24 '22 17:05 christianmagill

Not sure what you are looking for. I would like to help if you explain with more details what you are doing. Change state based on what?

This plugin is intended to solve other problems. I think you will have to use another approach and not groups

onmax avatar May 24 '22 18:05 onmax

I need the exact same feature. Because I want to add in javascript a class to an element. And I want to have many css rules different for children of this element when this element contains this css class.

jpheos avatar Sep 14 '22 08:09 jpheos