Koka-UI is a UI library that uses effects to provide a concise tree builder and efficiently compute layouts.
fun main()
ui
vertical
horizontal
text("Hi")
vertical
space(h=1)
border
text("Big")
text("Man")
text("World")
.printlnPrints
Hi Man
┌───┐
│Big│
└───┘
World
The library depends on (https://github.com/HeikoRibberink/koka-hlib), and needs to be included. Until we get a proper package management system, this can be done in multiple ways:
- (Recommended) go to the folder containing
koka-uiand rungit clone https://github.com/HeikoRibberink/koka-hlib.git. - Go to a location where you store your Koka packages, run
git clone https://github.com/HeikoRibberink/koka-hlib.gitthere and create a (symbolic) link insidekoka-uito that installation ofhlib. - Go to a location where you store your Koka packages, run
git clone https://github.com/HeikoRibberink/koka-hlib.gitthere. From now on, you can execute the Koka compiler with the option-i[path to hlib installation]. Mind that there must be no space between the-iand the path.