kobaltedev / kobalte

A UI toolkit for building accessible web apps and design systems with SolidJS.
https://kobalte.netlify.app/
MIT License
1.3k stars 75 forks source link

Allow to set element to attach portal #493

Closed floratmin closed 1 month ago

floratmin commented 1 month ago

I am using vanilla-extract themes and attach them to an element. With this I can view different themes side-by-side in storybook. The problem arises when I use theme variables in a portal. Because the portal is always attached to the body, these variables do not get picked up.

For this it would be good if there would be the possibility to pass an id or element to a portal and attach the portal to this element.

floratmin commented 1 month ago

I saw in the source code that I can attach the portal with the mount property.