Adding Slots
#347
Replies: 2 comments 2 replies
-
|
TIL, and wow, I'm sold - https://panda-css.com/docs/docs/concepts/slot-recipes#atomic-slot-recipe-or-sva It would be beneficial to have support for slots in cva. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for raising this again. I completely agree, relying on CSS variables and :has() trickery becomes a specificity nightmare with Tailwind. Slots would let us apply regular Tailwind utilities directly where they're actually used, avoiding all the : and data-[slot=] sprawl. There's a resource with practical examples that illustrates how slots could simplify component composition, you can click here to see it. The feedback about enforcing slots with variants is spot-on too, slots work best when paired with clear variant patterns rather than becoming sprawling CSS definitions. Hopefully this request gains more traction this time around. Appreciate you keeping this conversation going. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Another year, another
Slotrequest. I saw that previous requests (#287, #189) have been closed. The beta docs suggest using...I use Tailwind CSS and found that this way it becomes a specificity footgun:
group/*sprawl.With slots I can add regular Tailwind utilities to the place where they are actually applied. This requires a lot less
*:,**:,has-*, anddata-[slot=*]trickery.Notes: One ▲ DENG feedback regarding tailwind-variants:
Thank you for any consideration.
Beta Was this translation helpful? Give feedback.
All reactions