Cross-platform GUI library for V. Inspired by the syntax of Java's Swing.
Example: (examples/demo/)
Example
fn main() {
mut window := ui.make_window(
title: 'My App'
width: 640
height: 480
theme: ui.theme_default()
)
// Create Button
mut btn := ui.button(
text: 'A Button'
)
btn.subscribe_event('mouse_up', on_click_event)
// Add Button to Window & Run
window.add_child(btn)
window.gg.run()
}
fn on_click_event(mut e ui.MouseEvent) {
println('Button clicked!')
}
Install
Install via VPM:
v install https://github.com/isaiahpatton/ui
then
import iui as ui
Components
- Components marked with
TODO
are coming soon.
Themes
Included Themes:
- Light: Default, Minty, Ocean.
- Dark: Dark, Black (with White, Red, & Green accent colors)
Used in
- Vide
- Verminal
- vPaint - Demo: https://vpaint.app
License
This project is licensed under MIT OR Boost.