iu
Version, currently 0.1.13 versions
- 0.1.1latestMay 11, 2021
- 0.1.0not indexedFeb 19, 2024
- 0.0.2not indexedFeb 19, 2024
github.com/grkek/iu
UI framework based on the Fusion/libui.cr library, with elements from watzon/cru.
77 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
iu:
github: grkek/iu
version: ~> 0.1.1Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Giorgi Kavrelishvili
Dependencies
Runtime Dependencies
README
IU
UI framework based on the Fusion/libui.cr library, with custom elements from watzon/cru.
Motivation
Currently avaliable Crystal UI frameworks are either not maintained anymore or the documentation is scarce and a single error might cause a developer to lose motivation, which is why I decided to build IU on top of the LibUI framework which is a multi-platform powerful UI toolkit.
Build status
Features
Widgets
- Horizontal box, Vertical box, Checkbox, Combobox, Editable combobox.
- Button, Font button, Color button, Radio button.
- Datetime picker, Progress bar, Slider, Spinbox.
- Text entry, Multiline text entry.
- Form, Grid, Group, Table, Tab, Separator.
- Image, Label.
- Window, Menubar, Area.
- Many more.
Platforms
- Mac OSX
- Linux
- Windows (Once crystal will be available on Windows)
Code example
require "iu"
module Example
include Iu::Components
# Ability to reuse components extracted to other classes.
class MyComponent < Iu::ReusableComponent
def initialize(@id : Int32); end
def render : Iu::Component
Group
.new(title: "MyComponent", margined: true)
.adopt(
VerticalBox
.new(padded: true)
.adopt(
Label.new(text: "Hello, World ##{@id}!"),
stretchy: true
)
.adopt(
Button.new(text: "Click Me!"),
stretchy: true
)
)
end
end
# :nodoc:
class Application < Iu::Application
def initialize_component
window =
Window.new(
title: "Example",
width: 800,
height: 600,
menu_bar: false
)
window.margined = true
window
.adopt(
HorizontalBox
.new(padded: true)
.adopt(
MyComponent.new(1),
stretchy: true
)
.adopt(
MyComponent.new(2),
stretchy: true
)
.adopt(
MyComponent.new(3),
stretchy: true
)
)
window.closing.on do
exit(0)
end
window.show
end
end
end
app = Example::Application.new
app.should_quit.on do
exit(0)
end
app.start
Installation
- Follow the instructions for installation laid out in andlabs/libui.
- Copy the compiled files from step 1 (i.e. files in
build/out) to/usr/libfor OSX and Linux users. - Go to your
shard.ymlfile, and enter this in:
dependencies:
iu:
github: grkek/iu
- Run
shards install.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- May 11, 2021
- Commit
07a75ed13962- Crystal
1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/grkek/iu
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 23, 2026
- Synced
- Sep 23, 2026
- Versions
- 3
