Skip to content

Latest commit

 

History

History
70 lines (55 loc) · 1.89 KB

README.adoc

File metadata and controls

70 lines (55 loc) · 1.89 KB

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.