https://kotlinlang.org logo
Join Slack
Powered by
# compose-web
  • u

    ursus

    09/26/2025, 1:19 PM
    Cheeky question. What does
    <http://kotlinlang.org|kotlinlang.org>
    use for frontend?
    r
    e
    • 3
    • 2
  • u

    ursus

    09/27/2025, 7:42 PM
    With compose-html, how do I observe scroll offset? (i'm accepting kobweb extensions as well 😀)
    c
    s
    • 3
    • 33
  • m

    martmists

    09/30/2025, 11:48 AM
    For some reason my wasm app started throwing
    Copy code
    Module not found: Error: Can't resolve './skiko.mjs' in '/path/build/wasm/packages/project-name/kotlin'
    but it worked fine a few days ago, any ideas what could be causing this? The only things that really come to mind are that I've added Coil3 and Skydoves ColorPicker
    i
    o
    j
    • 4
    • 21
  • m

    martmists

    10/01/2025, 4:51 PM
    Is the file available for download anywhere perhaps?
    a
    • 2
    • 2
  • l

    lomovskiy

    10/06/2025, 9:57 AM
    Hello everyone I ran into a problem in my application - when the browser page is reloaded, the application is not rendered (an empty white page). In chrome inspector, you can see that the files index.html / app.the js and 2 .wasm files are loaded from the cache. What could be the reason for this behavior?
  • p

    pierbezuhoff

    10/07/2025, 2:49 AM
    After switching from
    CanvasBasedWindow
    to
    ComposeViewport
    i found that after pressing Tab the canvas becomes focused and gains a distracting white outline (on chrome). Is there a way to apply CSS to the canvas? It's under shadow-root so normal stylesheets don't affect it.
    v
    o
    +2
    • 5
    • 7
  • s

    Saif

    10/10/2025, 6:09 PM
    hi there I am making a kotlin mobile app and I will have to let the users use it directly from a website how can I do that
    t
    a
    • 3
    • 2
  • a

    Alex Styl

    10/11/2025, 4:10 AM
    Finally got the chance to report the font loading bug on web. Opened an issue at: https://youtrack.jetbrains.com/issue/CMP-9075/Square-placeholders-shown-before-loading-custom-fonts-on-Web
    loading.mov
    ⬆️ 1
    t
    k
    r
    • 4
    • 5
  • r

    Rafael Diaz

    10/11/2025, 5:39 PM
    Now that Compose Web is in Beta, are there any plans to allow deleting characters while holding down the shift key? I think it would help it'd really help the user experience with any CMP Web app that involves typing. Another thing that's sorta on my wish list, is that native web apps allow you to start typing as soon as the tab is opened (such as any search engine or ai chatbot website). I haven't figured out a way to do this with CMP Web that doesn't involve getting the user to mouse click on the page first.
    m
    • 2
    • 2
  • l

    Lucas Pluvinage

    10/15/2025, 11:44 AM
    Hi, I found a bug in how multi-touch events are handled in compose-web. The issue was opened a few days ago: https://youtrack.jetbrains.com/issue/CMP-9030/wasm-canvas-incorrect-handling-of-multi-touch-input I have a fix for it as I identified the faulty part in the pointer event handling implementation specific to compose/web. What is the process for upstreaming such change ? In the Github contribution guide, it is explained that opening PRs on Github is not accepted for the compose/ui subproject. Thank you
    o
    • 2
    • 2
  • a

    Alex Styl

    10/16/2025, 9:30 AM
    do i remember wrong that there is a way to have wasm fallback to js? how is that done? can't find it in the docs
    o
    • 2
    • 1
  • a

    Alex Styl

    10/16/2025, 11:42 PM
    How do i change the distribution path of a wasm compose app? When i use the
    distribution
    block, the composeApp.js and many other files are not included in the output
    Copy code
    wasmJs {
            browser {
                distribution {
                    val rootDirPath = project.rootDir.path
                    outputDirectory = File("$rootDirPath/dist/${project.name}") // <- 
                }
            }
            binaries.executable()
        }
    • 1
    • 1
  • a

    Alex Styl

    10/17/2025, 3:36 AM
    I'm running
    wasmJsBrowserDistribution
    to package my compose web wasm app but the distribution contains 2 wasm files with weird names. is that normal? I expected to have just one .wasm file with the name is specify in the distribution block
    r
    o
    +2
    • 5
    • 15
  • a

    Alex Styl

    10/17/2025, 5:16 AM
    ~~Im facing this issue with embedding compose web inside of an iframe~~* even though i set the height of the iframe to be 400px, the contents of it end up being 404px and it causes the compose app to scroll. this is probably some styling issue, but i cant figure it out. any ideas? * Turns out this has nothing to do with the iframe. just running the app separately scrolls in place, even if the body is width + height 100%
    • 1
    • 1
  • s

    Sunil Kumar

    10/24/2025, 4:06 AM
    Hi guys, As now we have
    webMain
    as web main source set. so i was trying to use the
    WebElementView
    composable there in webMain , but its not resolving(not found). Its available in jsMain and wasmJsMain only. Why its not available in webMain? most of the compose things which were available in wasmJs or js, should be available there in webMain, right? or am i missing something?
    👀 3
    o
    • 2
    • 3
  • j

    jean

    10/24/2025, 6:09 AM
    (Cross posting from #CDFP59223) Hi! I heard in a lightning talk from the Kotlin Conf 2025 that Compose Multiplatform on Web (with Wasm) is rendered on Canvas. How does that work? Are there any resources diving into rendering? I have a bunch of questions like • Does it write ui updates as bytes into a shared memory and the web browser reads from it as a stream and sends that to the canvas? • Does it calculate/render the compose tree and send that over the browser where it converts it as UI?
    c
    o
    • 3
    • 2
  • k

    Khangpv202

    10/29/2025, 5:22 AM
    Hi team, When I upgraded to Compose Multiplatform
    1.9.0
    (from
    1.8.2
    ), it seems that the testing has stopped working. Specifically, the
    runComposeUiTest
    calls are no longer running. Has anyone else encountered this issue?
    m
    o
    o
    • 4
    • 9
  • m

    Mario Andhika

    10/30/2025, 4:22 AM
    What are the ways we can reduce caching of wasm binary? I have this challenge in that my client has to reload/refresh page to update the app. If they just reopen they still get the old app
    e
    a
    • 3
    • 6
  • a

    AndrewStone

    10/30/2025, 10:07 PM
    I've been pulling in my composeApp as a module using the autogenerated "composeApp.mjs" so that I can grab it as a module and call kotlin from javascript. However that import intermittently fails (as in your compose wasm app does not start) with error like "can't find the function _malloc in compose and skiko." I think I've narrowed it down to my app (the internal compose parts) calling skiko before its really up. So I reworked the composeApp.mjs (with AI help) to wait for skiko to fully come up first:
    Copy code
    import * as skiko from './skiko.mjs';
    import * as joda from '@js-joda/core';
    import { instantiate } from './composeApp.uninstantiated.mjs';
    
    export async function initComposeApp()
    {
        if (skiko.ready)
        {
            await skiko.ready;
        }
        else if (typeof skiko.instantiate === "function")
        {
            // fallback for older skiko
            await skiko.instantiate();
        }
        const { exports } = await instantiate({
            './skiko.mjs': skiko,
            '@js-joda/core': joda
        });
        return exports;
    }
    So far it appears to be working. I figured I'd post this here, because I think anyone else who is trying to use their composeApp as a module will hit the same problem.
  • g

    gbaldeck

    11/04/2025, 8:26 PM
    Hi all! I am developing a multiplatform compose app that supports Google Oauth SSO for iOS, android, desktop, and wasmJs. For wasmJs, the new way of supporting Google Oauth is with GIS which requires you use a premade HTML element included in the library. As you can imagine, this is a problem since compose for wasmJs uses canvas, and there is no way to include HTML elements in canvas. The old way of doing it using GAPI would work since it can be done completely in JavaScript. But GAPI is deprecated and will be removed. How should this be done for Compose multiplatform for wasmJs?
    c
    • 2
    • 2
  • n

    Nino

    11/06/2025, 5:52 PM
    Hello, I'm an Android developper with < 2 years of Compose experience (on Android) and ~15 years of Android Java / Kotlin. I'm familiar with "entry level ops" (I consider myself a "mobile ops", the Gradle and CI are my friends). I want to develop a small website for a group of friends where we can upload photos, add tags / metadata to them, and browse throught them. I'd like to code this in Compose obviously. My knowledge of JS / TS is around 1% and I'd like to keep it as low as possible to keep my sanity as high as possible. Does it look like a plan or am I greatly overestimating my skills? If you have any usefull ressources about hosting images I'll glady read them, there's thousands of solutions but I don't have the experience to know which one fits my needs.
    j
    r
    • 3
    • 12
  • w

    Winson Chiu

    11/07/2025, 4:06 PM
    Does Compose web have an exposed
    ContextMenuArea
    equivalent for a right click menu anchored to a specific component? That composable actually exists, but it's internal and only for text selection, unlike the desktop counterpart.
  • a

    Alex Styl

    11/08/2025, 6:00 AM
    How can I use fonts available to the browser on Compose Web? I've tried the following and all of them render as roboto. I also tried preloading, but still the same result
    Copy code
    listOf(
        "sans-serif",
        "sans",
        "roboto",
        "system",
        "Arial"
    ).forEach {
        val fontFamily = FontFamily(SystemFont(it))
        Text("The quick brown fox 🦊😍🤔 ${it}", fontFamily = fontFamily, fontSize = 32.sp)
    }
    k
    j
    e
    • 4
    • 10
  • m

    maximilianosorich

    11/09/2025, 5:04 PM
    Hello, are there plans of development of WASM/Browser + Ktor packages for SEO in short term? I am new to this SEO topic and have written a complete e-commerce in Kotlin/WASM with Compose multiplatform, but I could not find the complete way achieve a good work here. My little understand of the task tells me I should send an initial HTML for crawlers from Ktor. and displays it until the WASM finishes loading, This transition is the major problem: We have no way to use this initial html for a smooth transition to WASM, therefore making the Kotlin/WASM Compose less competitive than other technologies in terms of SEO. Am I wrong or missing something here?
    c
    s
    • 3
    • 4
  • t

    tz311

    11/11/2025, 8:47 AM
    Hi i would like to know if its possible to integrate compose web with adsense web ads, can use js/html elements like we can do for ios?
    c
    • 2
    • 1
  • e

    Ekaterina Volodko [JB]

    11/11/2025, 10:01 AM
    Calling all Compose Multiplatform for Web devs! 🌐 We’re gathering real stories from developers building with Compose Multiplatform for Web. 🗣️ Tell us about your experience – which use case fits your project best? ⚡ Instant web trials 🛠️ Internal applications, such as dashboards and admin panels 🤝 Sharing design system components with colleagues 💡 Or something else? ⚙️ What worked well — and what could be better? 🔗 Share a short note about what you’re building and add a project link if you’d like! The best quotes will be featured on our new Compose Multiplatform for Web landing page to highlight real developer experiences. Drop your thoughts in the thread and help inspire others to try Compose Multiplatform for Web! 💬 Slack Conversation
  • a

    Alex Styl

    11/14/2025, 8:25 AM
    My app locks up while i am preloading emojis on the web. This results in a 2 second freeze (nothing is interactive and the app is unresponsive). The font is Noto Colored Emoji and it's 25mb. is this expected or a bug? Am i missing some option to load this async?
    i
    a
    +3
    • 6
    • 23
  • a

    Alex Styl

    11/14/2025, 1:12 PM
    I want to load monochrome font emojis and at a later stage load colored ones Right now if i try to load the monochrome ones and at a later stage load the colored ones, nothing happens. I think it's because it's the exact same 'glyphs' in both. Is it possible to update the font somehow? maybe wipe the font cache? I can't find something related
    o
    • 2
    • 8
  • j

    Joaquim Puyo

    11/18/2025, 6:46 AM
    Hello, any opinion about creating some kind of Netflix app in compose multiplatform web? (I say Netflix just an example, because everyone knows it). Any recommendation about which would be the right choice between wasm or compose html frameworks like kobweb? My concerns about this: • Potential performance issues when rendering nested lists • Potential issues with missing features in the player or drm content, or streaming performance Any hint? Maybe is too early to try this on a enterprise project? Thanks!
    r
    o
    • 3
    • 3
  • b

    bod

    11/18/2025, 9:24 PM
    👋 Trying to capture keyboard events using
    Modifier.onKeyEvent
    , this seems to work only after the Compose canvas is focused. So I either need to first click on it, or add a bit of JS that finds the canvas and call
    focus()
    on it... Is this a known issue and/or is there a trick?
    w
    a
    • 3
    • 11