On another note, how to make a popup/dialog wiith ...
# compose-web
l
On another note, how to make a popup/dialog wiith compose web? Does anybody have an example of that?
a
It isn’t related to compose. There are different ways: 1. There’s
dialog
tag. https://css-tricks.com/some-hands-on-with-the-html-dialog-element/ 2. Default HTML positioning things like
position: absolute
,
left
,
top
, etc… I think there are lots of examples in the internet.
h
What framework do you use, Material, Bootstrap?
l
None 😅 I'm using compose only.
@Akif Abasov [JB] Why isn't this related to compose? I'm treating compose as a framework of some sort, such as React. I would ask this on React SO 😄
h
It's related to JS/HTML etc, not Compose specific.
l
I see. I thought compose would have something like
Dialog(visible = dialogState) { ... }.open()
, as this exists in Android's Compose
That's why I thought that maybe this could be compose-web related
Does this kind of feature makes sense? I'd open a feature request issue if it does
n
I think that currently you have to implement it yourself (or use some library if you find). You can use the docs/examples mentioned above. Compose/Web is (currently) very low-level, it has only `@Composable`s wrapping the DOM, it does not have higher level components.
2
h
Compose for Web is pure HTML, and in pure HTML there is no "pretty" customizable dialog (except the linked
<dialog>
tag, but it is unsupported in Safari). So either use some frameworks, eg bootstrap, RingUI (?) or MaterialUI, which is used on Android, or develop it by yourself.
2