aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-12 12:08:10 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-12 12:08:10 +0100
commit00a6ddf04d61ab322a36123891573c35b41ab58a (patch)
tree6e85cf659ead46eefab38412939a97c528164030 /README.md
parenteea44b35add0d036119888f41e4ed38e75190934 (diff)
downloadkvision-00a6ddf04d61ab322a36123891573c35b41ab58a.tar.gz
kvision-00a6ddf04d61ab322a36123891573c35b41ab58a.tar.bz2
kvision-00a6ddf04d61ab322a36123891573c35b41ab58a.zip
Updated API doc
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4eb0ec33..c72de672 100644
--- a/README.md
+++ b/README.md
@@ -18,6 +18,7 @@ This design is quite similar to many non-web UI programming libraries including
## Features
- 100% type safe and fully compiled dev environment.
+- Type safe DSL builders.
- Based on [Bootstrap](https://getbootstrap.com/) styles, typography and components.
- Utilizes [Snabbdom](https://github.com/snabbdom/snabbdom) fast virtual DOM implementation.
- Integrates with libraries and components from [Font awesome](https://fontawesome.com/), [Bootstrap Select](https://github.com/silviomoreto/bootstrap-select) (with [AJAX](https://github.com/truckingsim/Ajax-Bootstrap-Select) extension),
@@ -86,6 +87,20 @@ built with [Gradle](https://gradle.org/) and supporting Webpack's [Hot Module Re
}
)
+##### Using type safe DSL builders
+
+ Root("root") {
+ hPanel(spacing = 20, alignItems = FLEXALIGNITEMS.CENTER) {
+ val label = label("Not yet clicked.")
+ var count = 0
+ button("Click me") {
+ onClick {
+ label.text = "You clicked the button ${++count} times."
+ }
+ }
+ }
+ }
+
### Tab panel with JavaScript routing
val firstPanel = Tag(TAG.DIV, "First")