We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any existing method to insert HTML native tags in Compose?
The text was updated successfully, but these errors were encountered:
You probably can add html with absolute position next to the compose render canvas and set its position from compose wasm code
Sorry, something went wrong.
Can be a great enhancement to have an HTMLView wasm composable that will allow to seamlessly use compose-html inside of it
HTMLView
There is no such API out of a box for now.
I've been doing this, works for me for now.
Code sample:
index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Sample</title> <script src="skiko.js"></script> </head> <body> <div id="root" style="z-index: 1"></div> <main> <canvas id="ComposeTarget" width="800" height="600"></canvas> </main> </body> </html>
Main.kt
fun main() { // Inject viewModel etc. onWasmReady { @OptIn(ExperimentalComposeUiApi::class) CanvasBasedWindow(title = "Sample") { val someSharedState by viewModel.someSharedState.collectAsState() // Canvas UI } } renderComposable(rootElementId = "root") { val someSharedState by viewModel.someSharedState.collectAsState() // HTML UI } }
eymar
No branches or pull requests
Is there any existing method to insert HTML native tags in Compose?
The text was updated successfully, but these errors were encountered: