Skip to content

nfrankel/kaadin

Repository files navigation

Kaadin

Build Status Code coverage download

Kaadin is a library to create Vaadin Graphical User Interface using a Kotlin Domain-Specific Language .

1. Two-minutes tutorial

An example is worth a thousand words:

import ch.frankel.kaadin.* //(1)
import com.vaadin.server.*
import com.vaadin.ui.*

class FirstStepUI(): UI() {
    override fun init(request: VaadinRequest) {
        verticalLayout(margin = true, spacing = true) { //(2)
            label("Welcome to Vaadin") //(3)
        }
    }
}
  1. Import the namespace ch.frankel.kaadin.*

    1. There’s one Kaadin function for each Vaadin component e.g. button() maps Button()

  2. The topmost component will automatically be added as the UI content. There’s one such function per common Vaadin component.

  3. Nested blocks allow to add children components and configure them

2. Usage

  1. Build

    mvn install
  2. Use

    <dependency>
        <groupId>ch.frankel.kaadin</groupId>
        <artifactId>kaadin-core</artifactId>
        <version>0.1-SNAPSHOT</version>
    </dependency>

3. Going further

The full documentation is available on the Kaadin site.

4. License

Kaadin is distributed under the friendly Apache 2.0 License.

Releases

No releases published

Packages

No packages published

Languages