Modals in SolidJS

Is there some proper way implementing modals in solid? I have a special button component and I want to open a modal on clicking this button. I read something about Portal. Can you help me here :)? What would you do? Best Practice?
3 Replies
jesseb34r
jesseb34r2y ago
Modals are a bit of a challenge for sure. The <Portal /> element is what you are looking for mixed with some absolute positioning. But if you want the easiest way to implement a modal with all the best practices taken care of I highly recommend checking out https://kobalte.dev/docs/components/dialog
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Birk Skyum
Birk Skyum2y ago
The solid-bootstrap modals are also easy to use: https://solid-libs.github.io/solid-bootstrap/components/modal
Want results from more Discord servers?
Add your server