![iUI](https://private-user-images.githubusercontent.com/16439221/254777690-14ccf60b-cff4-4f49-884f-d6dc2cc796ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTgxODksIm5iZiI6MTczODg5Nzg4OSwicGF0aCI6Ii8xNjQzOTIyMS8yNTQ3Nzc2OTAtMTRjY2Y2MGItY2ZmNC00ZjQ5LTg4NGYtZDZkYzJjYzc5NmVmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAzMTEyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYzODQ2MWQzZmNjNTgxYTk2ZTgzYTkwZmExZDllNDEwM2ViNWU1ZTFlOWNlMDc4YjkxYzcyMzdiMDkyOTI4MzQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Je-I7liltuzjhfA_Xuw33DOUdXam3spNiA-LXHouIDc)
Cross-platform GUI library for V. Inspired by the syntax of Java's Swing & my take on WinUI-3 Style.
Example: (examples/demo/)
fn main() {
mut window := ui.Window.new(
title: 'My App'
width: 640
height: 480
)
// Create Button
mut btn := ui.Button.new(text: 'My 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(e &ui.MouseEvent) {
println('Button clicked!')
}
Install via VPM:
v install https://github.com/pisaiah/ui
then
import iui as ui
Components | Containers | Panel Layouts |
---|---|---|
Button | Window | Flow Layout |
Checkbox | Panel | Border Layout |
Hyperlink | Tabbox | Box Layout |
Image | Modal | Grid Layout |
InternalFrame | Page | Card Layout |
Label | ButtonGroup | |
Menubar | ScrollView | |
MenuItem | Splitview | |
NavPaneItem | TitleGroup | |
ProgressBar | Popup | |
Selectbox | DesktopPane | |
Slider | NavPane | |
Switch | ||
Textbox | ||
TextField | ||
Treeview |
- Components are the elements of the UI (buttons, inputs, etc).
- Containers are components that are designed to contain other components (known as children).
- Layouts define how the Panel container positions it's children.
More details about Layout: A Visual Guide to Layout Managers - docs.oracle.com
Light: - Default, Minty, Ocean, Seven. | ![]() |
Dark: - Dark (with Blue/Red/Green/or RGB Accent), Seven Dark. | ![]() |
BorderLayout Demo | Internal Frames | Navigation Pane |
---|---|---|
![]() |
![]() |
![]() |
Border Layout Demo | Internal Frames | Navigation Pane |
Notepad | Calculator | Clock | Video Player |
---|---|---|---|
![]() |
![]() |
![]() |
![]() |
See: Notepad | Calculator | Clock | Video Player (requires libmpv) |
Mines | (Tic Tac Toe)^2 | Snake |
---|---|---|
![]() |
![]() |
![]() |
Code: 1-Minesweeper Demo: Play online (via WASM) |
2-Tic-Tac-Toe-Squared Play online (WASM) |
3-Snake |
- Vide
- Verminal
- vPaint - Demo: https://vpaint.app
This project is licensed under MIT OR Boost.