/ui

My UI Widget library for V

Primary LanguageVMIT LicenseMIT

Isaiah's UI 0.0.18 GitHub

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

Name Picture (Default Theme) Name Picture (Default Theme)
Button image Label image
TextArea/TextField image Menubar image
Opened MenuItem image Checkbox image image
Selectbox image Radio Button TODO
Treeview image ProgressBar image
Tabbox image HBox (need preview)
VBox (need preview)
  • Components marked with TODO are coming soon.

Themes

image

Included Themes:

  • Light: Default, Minty, Ocean.
  • Dark: Dark, Black (with White, Red, & Green accent colors)

Used in

image

License

This project is licensed under MIT OR Boost.