Skip to content
Discussion options

You must be logged in to vote

Silk does not currently have a modal widget (one day, we plan to!), but here's something I implemented myself in an old project. Feel free to check it out and modify it as needed for your case. (Silk does have an Overlay widget that creates a full screen transparent gray foundation which we use here)

Here, my modal class is designed to allow a row of title elements that appear at the top, a row at the bottom (useful for buttons), and then the content area, which lays things out as a column:

import androidx.compose.runtime.*
import com.varabyte.kobweb.compose.css.*
import com.varabyte.kobweb.compose.dom.ElementRefScope
import com.varabyte.kobweb.compose.foundation.layout.Column
import com.…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@adityatri
Comment options

@naser09
Comment options

@bitspittle
Comment options

Answer selected by adityatri
Comment options

You must be logged in to vote
1 reply
@bitspittle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants