compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

How to make a DESKTOP + WEB multi-platform app?

Open jsomeara opened this issue 4 years ago • 2 comments

I haven't found any intuitive guides or docs on this. How would one go about making a DESKTOP + WEB multi-platform app? This would mean shared styling, etc.

Thanks!

jsomeara avatar Feb 20 '22 20:02 jsomeara

Web and Desktop don't share UI elements at the moment, as they have different rendering engines. So you can share only runtime part (recomposition logic).

We are working on Web-Canvas implementation, that will allow you to share UI elements too.

akurasov avatar Feb 21 '22 05:02 akurasov

will there be any alpha preview of this anytime soon ?

meshpaul avatar Jul 14 '22 20:07 meshpaul

Is it available yet?

GabrielLasso avatar Feb 02 '23 14:02 GabrielLasso

Compose now targets web canvas , lot of bugs though and skia lib is huge

wakaztahir avatar Feb 02 '23 14:02 wakaztahir

How can I add web canvas to an existing desktop+android project?

The current bugs are not a problem for now, since I plan to release this only next year

GabrielLasso avatar Feb 02 '23 14:02 GabrielLasso

I have a project code editor that you can look at

https://github.com/Qawaz/compose-code-editor

Try to build this project , run browserRun task inside the Gradle tasks and it will launch a window

It uses compose 1.2.2 I plan to update to kotlin 1.8 and compose 1.3 soon

wakaztahir avatar Feb 02 '23 14:02 wakaztahir

You can check the experimental examples here: https://github.com/JetBrains/compose-jb/tree/master/experimental/examples

I have created a project to play with compose multiplatform and also help to discover bugs, can check it here: https://github.com/pablichjenkov/templato

pablichjenkov avatar Feb 02 '23 14:02 pablichjenkov

Thanks!

I will see how it is done in this projects

I think it should be better documented in readme and in Intellij project creation. You have an schedule for web canvas and ios becoming stable?

GabrielLasso avatar Feb 02 '23 16:02 GabrielLasso