Türkçe
Modern desktop windows, in plain Ruby
Write the window in Ruby: boxes, texts, buttons and ready components appear in a small window of its own. Only Ruby: no JavaScript, no HTML, no CSS, no front-end build, no other gem and no compiler.
v0.1.4 · experimental · Ruby 2.6+ · tested on macOS and Windows · 83 components, each a method · basic.js inside: about 3.4 MB, no internet · no other gem, no compiler · Apache 2.0
gem install ozdenui
A counter in a few lines
Groups place the objects for you, and a lambda given to a button runs when it is clicked.
- A group is a block. The objects made in the block of a group go into it: the shape of the code is the shape of the window.
- Values in Ruby. @label.text = "1" changes the window; field.text and box.checked? are read in Ruby, with no question to the window.
- One thread, no locks. The block of run, an event and a timer run one at a time. The changes of a task go to the window together, when it ends.
Only Ruby, nothing to build
- No other gem, no compiler. gem install ozdenui and nothing else: no native extension to build, no Node, no npm. basic.js and its components are inside the gem (about 3.4 MB) and are served only to this computer: no internet.
- The Ruby you already have. Ruby 2.6 or newer, also the Ruby that comes with macOS. On macOS the window is the web view of the system, called through fiddle; on Windows and Linux it is an app window of Edge or Chrome.
- Code that reads like the window. Groups are blocks, the names are those of basic.js in snake_case, events are lambdas, methods or blocks. A wrong name is told in the terminal with the line of your program and the name you meant.
- Threads welcome. A slow job runs in a Thread of its own and the window does not wait. ui { } brings its result back to the objects.
Ready components, called from Ruby
SmartButton, TextField, EmailField, PasswordField, NumberField, UrlField, PhoneField, CurrencyField, TextAreaField, SearchInput, TagInput, CheckBox, Toggle, RadioButton, SelectBox, Slider, RangeSlider, SliderField, Stepper, DatePicker, TimePicker, ColorPicker, FilePicker, ProgressBar, StepBar, ItemList, SortableList, SmartTable, DataTable, TreeView, Tabs, Accordion, GridGroup, ScrollArea, Splitter, SidePanel, GraphBox, Gauge, LogView, ImageView, MarkdownView, JsonView, JsonEditor, CodeEditor, Canvas, ChatView, WebView, MenuBar, ToolBar, StatusBar, ContextMenu, Tooltip and the others of the 83. Each one is a method of its name, with the params of the kit in snake_case; component("Gauge", ...) makes any of them by its name.
A component of your own, in plain Ruby
A class that makes its objects in a group is a component: use it again and again, change it with its methods, share it as a file or a gem. No JavaScript is needed.
A dialog that returns its answer
confirm waits for the answer and returns it, like a question in a terminal. The window keeps working meanwhile: timers run and the page is drawn.
Twenty-one small programs
A small code editor, A small Markdown editor, A small JSON viewer, CSV viewer, A chat, Charts, Image viewer, A job and its log, A form, Settings, To do, Notes, Dialogs, Gallery, The minimal look, Calculator, The basic objects, Counter, Greeting, Clock and Catch the dots, in the examples folder of the repository.
Where it fits
A good choice for a script or a command line tool that needs a window, for a tool given to your team as one Ruby file, and for a modern look without HTML, CSS or a front-end build. For more than one window (v0.1.4 has one window for a program), a program given as an app of its own, a large desktop application with the widgets of the system (Ruby/GTK) or a web application for many users (Rails or Sinatra), something else is better.
Three steps
- Install it. gem install ozdenui: one gem, with no other gem behind it and nothing to compile. On macOS the Ruby of the system is enough.
- Write the block of run. Make the objects of the window in it. Groups place them; a lambda or a method runs on a click.
- Run it. ruby hello.rb opens a window; run returns when it is closed.
The handbook: from the first window to a component of your own, in English and Turkish.
Ruby 2.6+. Tested on macOS and Windows 11. On macOS the window is the web view of the system (WKWebView); on Windows and Linux it is an app window of Edge or Chrome. Linux is checked by the tests of the repository, not yet by hand.
OzdenUI for Ruby is open source under the Apache 2.0 license: GitHub, RubyGems. The family: OzdenUI for Python, OzdenUI for Go, basic.js, the components. This page is built with basic.js. Developed with the help of Claude Code (Anthropic). © 2026 Buğra Özden.