karibu-dsl
Karibu-DSL, Kotlin extensions/DSL for Vaadin
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
andTabSheet
- 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() {} }
Links
Compatibility
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
- 2023-08-24
- Maturity
- STABLE
- License
- MIT License
Compatibility
- Framework
- Vaadin 14+
- Browser
- N/A