Directory

← Back

karibu-dsl

Karibu-DSL, Kotlin extensions/DSL for Vaadin

Author

Rating

Popularity

100+

This is a Kotlin extensions and DSL library for the Vaadin framework. Please visit Vaadin-on-Kotlin pages for the Getting Started guide.

This library:

  • Allows you to create Vaadin UI designs in the structured code way; the idea behind the library is explained in the DSLs: Explained for Vaadin article. The general DSL idea is explained in Kotlin Type-Safe Builders.
  • Includes useful components like PopupButton and TabSheet
  • Contains additional useful methods which Vaadin lacks; see karibu-tools

Sample code

class ButtonBar : KComposite() {
    init {
        ui {
            // create the component UI here; maybe even attach very simple listeners here
            horizontalLayout {
                button("ok") {
                    onLeftClick { okClicked() }
                }
                button("cancel") {
                    onLeftClick { cancelClicked() }
                }
            }
        }

        // perform any further initialization here
    }

    // add listener methods here
    private fun okClicked() {}
    private fun cancelClicked() {}
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2024-03-26
Maturity
STABLE
License
MIT License

Compatibility

Framework
Vaadin 14+
Browser
N/A

karibu-dsl - Vaadin Add-on Directory

Karibu-DSL, Kotlin extensions/DSL for Vaadin karibu-dsl - Vaadin Add-on Directory
This is a Kotlin extensions and DSL library for the [Vaadin](https://www.vaadin.com) framework. Please visit [Vaadin-on-Kotlin](http://www.vaadinonkotlin.eu/) pages for the Getting Started guide. This library: * Allows you to create Vaadin UI designs in the structured code way; the idea behind the library is explained in the [DSLs: Explained for Vaadin](https://www.vaadinonkotlin.eu//dsl_explained/) article. The general DSL idea is explained in [Kotlin Type-Safe Builders](https://kotlinlang.org/docs/reference/type-safe-builders.html). * Includes useful components like `PopupButton` and `TabSheet` * Contains additional useful methods which Vaadin lacks; see [karibu-tools](https://github.com/mvysny/karibu-tools)
Online