> Markdown version of [Using Vaadin with Kotlin](https://vaadin.com/docs/v8/framework/getting-started/getting-started-kotlin). Section index: [llms.txt](https://vaadin.com/docs/v8/framework/llms.txt)

# <a id="getting-started.kotlin"></a>Using Vaadin with Kotlin

You can use Vaadin with the [Kotlin](https://kotlinlang.org/) language as well. Kotlin offers awesome tooling which includes a plugin for Intellij IDEA, Eclipse and Netbeans. The plugin includes the possibility to convert any Java class to Kotlin, therefore the easiest way is to generate the sample [Java Vaadin Maven project](https://vaadin.com/maven) and then convert the MyUI class to Kotlin, by pressing `Ctrl`+`Alt`+`Shift`+`K`. The Kotlin plugin will convert the class and include Kotlin Maven plugin to your pom.xml.

The [Karibu-DSL](https://github.com/mvysny/karibu-dsl) library offers a more Kotlin-like API for Vaadin. The library will allow you to create your UI in a hierarchical way. For more details please see [Kotlin Type-Safe Builders](https://kotlinlang.org/docs/reference/type-safe-builders.html). There is a [Karibu Helloworld Application](https://github.com/mvysny/karibu-helloworld-application) sample which demonstrates this technique. It is a standard Gradle project, thus you only need to `git clone` the project and open it in your IDE. The hierarchical code looks as follows:

```kotlin
@Theme("mytheme")
class MyUI : UI() {

    private lateinit var layout: VerticalLayout

    @Override
    override fun init(vaadinRequest: VaadinRequest) {
        layout = verticalLayout {
            val name = textField {
                caption = "Type your name here:"
            }
            button("Click Me", {
                println("Thanks ${name.value}, it works!")
                layout.label("Thanks ${name.value}, it works!")
            })
        }
    }
}
```

It is also possible to use Kotlin to access your database, allowing you to build full-blown web applications. For details please see the [Vaadin-on-Kotlin](https://www.vaadinonkotlin.eu/) library. Just follow the Getting Started tutorial there - the tutorial will guide you step-by-step.
