Combine Kotlin an jsx files


i have created a Project like this article,

If i started this, then all would be good and all is running. Now i need to implement js file like these Structure:

export default function Car() {
    return (

Then i write an adapter for this, to implement in kotlin:
external val Car : FC< BoxProps>

Now the problem is, i get an error like that:

Can anyone help me please about that? Thank you.


Where did you see JSX being used with Kotlin? I’ve never heard of anyone using JSX (or would it be called “KX” since it’s Kotlin instead of Javascript) with Kotlin myself.

Usually, it’s an HTML DSL like in the documentation you linked.

Even when making a React app with Kotlin you still use HTML builders

div {
    css {
        position = Position.absolute
        top = 10.px
        right = 10.px
    h3 {
        +"John Doe: Building and breaking things"
    img {
        src = ""


thanks. Kotlin create JS-Files with Webpack. I need to use also external JS-Files and not only with HTML-Builders.