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)
}
}
}
-
Import the namespace
ch.frankel.kaadin.*
-
There’s one Kaadin function for each Vaadin component e.g.
button()
mapsButton()
-
-
The topmost component will automatically be added as the
UI
content. There’s one such function per common Vaadin component. -
Nested blocks allow to add children components and configure them
-
Build
mvn install
-
Use
<dependency> <groupId>ch.frankel.kaadin</groupId> <artifactId>kaadin-core</artifactId> <version>0.1-SNAPSHOT</version> </dependency>
The full documentation is available on the Kaadin site.
Kaadin is distributed under the friendly Apache 2.0 License.