https://kotlinlang.org logo
Join Slack
Powered by
# kobweb
  • d

    David Herman

    05/17/2025, 1:49 AM
    Less than a week left for KotlinConf! If folks here weren't aware, I'll be speaking this year. https://kotlinconf.com/schedule/?day=2025-05-23&session=99af26ce-5c63-5ff5-a013-efcb16da833b I don't think there will be a livestream, but there will be a recording. Of course, if you are going to be there, please reach out to me and say hi in person!
    👏 9
    kodee happy 4
    🎉 1
    a
    • 2
    • 2
  • s

    Severiano Jaramillo

    05/19/2025, 1:12 AM
    I have been working as an Android dev for a few years, but have 0 experience with web development. I am hoping to use my Kotlin knowledge and some good vibes to build pet projects kodee happy I just created a sample project (
    kobweb create app
    ), did some minor updates and added configuration to build and deploy to GitHub Pages. This is not all I want to do, but first I would like to fix some simple issues. State such as color mode and menu state (when the available width is small) does not seem to work when the app is deployed, but it works when running it locally. Is this some kind of known issue?
    ✅ 1
    l
    d
    s
    • 4
    • 4
  • m

    Meet

    05/27/2025, 4:52 AM
    How can add sitemap.xml in kobweb if possible
    a
    c
    d
    • 4
    • 5
  • s

    Shubham Singh

    05/31/2025, 9:37 PM
    Update: Nevermind, I found this https://github.com/varabyte/kobweb/blob/main/frontend/silk-widgets/README.md Hi friends, is there some guidance available on how to add Kobweb into an existing Compose HTML project? I'd like to explore the possibility of using Kobweb to create Google Chrome Extensions. I know it's possible with Compose HTML and Kobweb is based upon it, so was wondering if someone has already tried doing this?
    s
    • 2
    • 7
  • d

    David Herman

    06/10/2025, 12:27 AM
    Just want to share a LinkedIn post one of our users shared on our Discord about their Kotlin multiplatform project ExpensePal. It uses Kobweb for the web portion and Compose Multiplatform for mobile OSes: https://www.linkedin.com/posts/dhavalshah53_kobweb-composemultiplatform-kotlinmultiplatform-activity-7337360426235576320-GNWL and the link has a nice embedded demo video which shows their project off with simultaneous Android / iOS / web views.
    kodee happy 2
    • 1
    • 1
  • d

    David Herman

    06/20/2025, 5:20 PM
    KotlinConf talks are up! Here's my talk on Kobweb. https://kotlinconf.com/talks/774286/
    yay 3
    K 13
    m
    s
    • 3
    • 6
  • d

    David Herman

    06/25/2025, 6:06 PM
    If anyone in here wanted to use Kobweb with Kotlin 2.2.0, you can try it out a little early with 0.23.0-SNAPSHOT
    Copy code
    kobweb = "0.23.0-SNAPSHOT"
    kotlin = "2.2.0"
    • 1
    • 2
  • c

    Christopher Mederos

    06/26/2025, 3:36 AM
    I've exported and deployed a static site with some markdown pages following the default example. I'm getting 404 responses when accessing those pages (https://my-app.com/about). However, if I go to my home page then click on a link to navigate there ( go to https://my-app.com then click on a link for https://my-app.com/about).... the pages are found! Curious if this sounds like an export configuration I'm missing in kobweb, or if I'm just having DNS issues
    d
    • 2
    • 32
  • c

    chax

    06/29/2025, 5:05 PM
    Hello all, Is there a rich text editor built into Kobweb or Kotlin JS that exists as an open-source project? potentially one that I can add a dependency to my project and create a blog of some sort. Thanks in advance cc @David Herman
    👀 1
    s
    d
    • 3
    • 22
  • d

    David Herman

    07/04/2025, 11:22 PM
    🕸️ Latest Kobwebs v0.23.0 🕸️ https://github.com/varabyte/kobweb/releases/tag/v0.23.0 First release since KotlinConf! Mostly a bunch of misc stuff (check out the release notes for details!), but we now officially support Kotlin 2.2.0.
    K 8
    🔥 3
    • 1
    • 1
  • s

    Seri

    07/24/2025, 5:22 PM
    Are there any kobweb templates, libraries, or sample projects which support "blog" style content? i.e., something which would bootstrap the following: 1. Date and tag-based content directories 2. Date-based page routing 3. Content rendering from an intermediate format like Markdown 4. Truncating content for previews or directory listings
    ➕ 1
    d
    s
    m
    • 4
    • 48
  • c

    Christopher Mederos

    07/25/2025, 6:50 AM
    Any tips for sorting out content shift? It's a bit foreign to me, as its usually not such a consideration with the compose-style
    s
    d
    • 3
    • 11
  • c

    Cheick Kante

    07/28/2025, 9:38 AM
    is there any way to get the processed or raw string of markdown files content ? i'd love to get them just like this
    Copy code
    val markdownContent = ctx.markdown!!.frontMatter["content"]
    or even better, if, I can have this:
    Copy code
    @Layout
    @Composable
    fun MarkdownLayout(content: (String) -> Unit)
    beside this:
    Copy code
    @Layout
    @Composable
    fun MarkdownLayout(content: @Composable () -> Unit)
    d
    • 2
    • 1
  • c

    Christopher Mederos

    07/29/2025, 5:37 AM
    how can we set the color for when the user overscrolls? I thought this was just the html backgound color - however the silk init from the demo/default app seems to not affect the overscroll areas
    Copy code
    @InitSilk
    fun initTheme(ctx: InitSilkContext) {
        ctx.theme.palettes.light.background = Colors.Blue
    }
    s
    d
    • 3
    • 5
  • c

    Christopher Mederos

    08/01/2025, 5:26 AM
    How can we add inline script's to our head (without a src)? I'm finding the kotlin html dsl rather enigmatic.... I'm trying to embed a typical email list signup form
    Copy code
    <script>
        (function(......
    </script>
  • r

    Rafael Tonholo

    08/02/2025, 9:32 PM
    Hi there! Is there a way to pass a parameter to a Kobweb call when using Markdown? What I would like to achieve is something like: Markdown:
    Copy code
    {{{ start .some.package.CustomComponent }}}
    
    ## My subtitle
    **bunch** of text with *different* ~styles~
    
    {{{ end .some.package.CustomComponent }}}
    
    Rest of the markdown file
    Composable:
    Copy code
    @Composable
    fun CustomComponent(content: @Composable () -> Unit) {
        Div(attrs = CustomComponentStyle.toAttrs()) {
            // other custom stuff
            content()
        }
    }
    And in the generated file, it would call the custom component something like this:
    Copy code
    @Page("/awesome-markdown")
    @Layout(".MarkdownLayout")
    @Composable
    fun Awesome_markdown() {
        project.some.package.CustomComponent {
            org.jetbrains.compose.web.dom.P {
                org.jetbrains.compose.web.dom.B {
                    org.jetbrains.compose.web.dom.Text("bunch")
                }
                org.jetbrains.compose.web.dom.Text(" of text with ")
                org.jetbrains.compose.web.dom.Em {
                    org.jetbrains.compose.web.dom.Text("different")
                }
                org.jetbrains.compose.web.dom.Text(" ~styles~")
            }
        }
        // Rest of the markdown file parsed
    }
    Would that be possible?
    d
    • 2
    • 28
  • b

    bj0

    08/09/2025, 4:32 PM
    Hey, I'm trying to learn kobweb by converting a super basic old react/ts website to kobweb. It's using react-toastify, and I'm not really sure how to translate that over to kobweb. Is there a way to utilize react library components or do I have to rewrite it from scratch? The website doesn't seem to mention js library interop at all (though It was a bulletpoint in the kotlinconf talk).
    d
    l
    • 3
    • 16
  • b

    bj0

    08/09/2025, 5:00 PM
    On a slightly related note, is there any examples of using an npm library like ol (openlayers map https://openlayers.org/doc/quickstart.html) in kobweb?
    d
    l
    • 3
    • 10
  • r

    Ryan Scott

    08/18/2025, 5:47 PM
    Question: Has anyone run across this error before when building their app (kobweb run --path=site):
    Copy code
    > Task :site:kspKotlinJs FAILED
    e: java.lang.IllegalStateException: Storage for [/Users/ryan/repos/ryan/fsryan/consulting/wagemix/monolith/site/build/kspCaches/js/jsMain/symbolLookups/file-to-id.tab] is already registered
    m
    l
    +3
    • 6
    • 32
  • d

    David Herman

    08/20/2025, 7:02 PM
    🕸️ Latest Kobwebs v0.23.1 🕸️ https://github.com/varabyte/kobweb/releases/tag/v0.23.1 A bunch of misc stuff (check out the release notes for details!), plus we now officially support Kotlin 2.2.10.
    K 5
    • 1
    • 1
  • c

    Christiano

    08/27/2025, 7:32 AM
    Is it possible that something like this
    .form-floating>.form-select:hover~label
    is not supported in a
    CssRule
    ? I'm trying to create something akin to the Bootstrap floating label but this selector
    ~
    doesn't seem to work when I add it. Even when adding it manually in the
    inspector-stylesheet
    in my browser itself, it does not seem to work. 😅
    s
    l
    • 3
    • 6
  • d

    David Herman

    09/03/2025, 6:45 PM
    🕸️ Latest Kobweb v0.23.2 🕸️ https://github.com/varabyte/kobweb/releases/tag/v0.23.2 A fairly small release on top of v0.23.1, but we fixed a bad bug for anyone setting
    basePath
    (which would be anyone who uses GitHub Pages, for example). A few other fixes as well. More details in the release notes!
    K 6
    K 1
  • d

    David Herman

    09/11/2025, 12:39 AM
    Kobweb snapshot is up now (
    0.23.3-SNAPSHOT
    ) which was built against Kotlin
    2.2.20
    in case anyone wants to try it early. Stable release likely out tomorrow (or the day after if we uncover any surprises).
    kodee happy 2
  • u

    אליהו הדס

    09/11/2025, 9:21 AM
    Hello everyone, I recently saw this project and although I am not convinced of its use in a real app, I think that on the other hand we should be inspired by it to port material to kobweb. Well, I'm just giving the idea, I really like kobweb and unfortunately I don't have the time to do it myself 😔
    👀 1
    ⭐ 2
    d
    • 2
    • 2
  • d

    David Herman

    09/11/2025, 9:21 PM
    🕸️ Latest Kobweb v0.23.3 🕸️ https://github.com/varabyte/kobweb/releases/tag/v0.23.3 Essentially a release for supporting Kotlin 2.2.20, enjoy!
    🚀 1
    r
    • 2
    • 1
  • r

    Ryan Scott

    09/13/2025, 4:32 PM
    Question for anyone on here: Has anyone integrated Sentry/Glitchtip? I was just able to do it (and exceptions are getting reported), but the main thing I haven't been able to do is get the kotlin source maps working.
    d
    s
    • 3
    • 35
  • u

    ursus

    09/27/2025, 8:41 AM
    Hi, how would I do what
    AnimatedContent { .. }
    does? i.e. to transition between composables based on input state?
    s
    • 2
    • 2
  • u

    ursus

    09/28/2025, 11:01 AM
    Hi, I'm webdev noob. I understand that in a pure react/compose-html app the html that will be deployed is basically just a shell and js will generate the rest of the DOM on client side and there is SSR which will precalculate the whole DOM, send that and browser just renders it as well Then there is kobweb export. Am I correct in saying that it's trying to be something in the middle? If so, how does it achieve that? When the site is rendered (so the included js is run) with a headless browser, and say i have there js which will hit an api, how would the kobweb export know to not bake the response in? Is it even trying to discriminate the static and dynamic stuff?
    s
    r
    • 3
    • 29
  • u

    ursus

    09/28/2025, 12:47 PM
    Since android's
    Row
    modifier
    horizontalScroll()
    is not available, how do I make a container of fixed width have its children horizontall scrollable?
    s
    d
    • 3
    • 31
  • c

    Christiano

    10/23/2025, 6:49 PM
    What are some of the best ways to deal with
    <br/>
    in texts in kobweb? I noticed you can use the
    innerHtml
    of an
    Element
    to inject text which has some
    <br/>
    . But doing something like
    SpanText(text = "Hello, this is a longer text with a line break.\nHere is the new line.")
    does not work out of the box... Otherwise, adding markdown support also works, but makes it more bloated when it's only for 1 part of the content... 🤔 😅
    d
    s
    • 3
    • 18