-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Modern, beautiful Text User Interfaces for Delphi — without the pain.
Blinki is an open-source Delphi library for building rich Terminal User Interface (TUI) applications. Instead of hand-coding ANSI escape sequences, managing screen buffers, or tracking dirty regions yourself, Blinki gives you a declarative widget tree, a constraint-based layout engine, and a built-in double-buffered renderer — all driven by a clean, single-threaded event loop.
Write Delphi, see a polished UI in the terminal.
| Problem | Blinki's answer |
|---|---|
| Manual ANSI sequences are error-prone and hard to maintain |
TTuiCanvas.WriteAt, FillRect, DrawBox — no escape codes in application code |
| Screen flicker when repainting | Double-buffer + diff renderer: only changed cells are emitted, in a single Write call per frame |
| Absolute coordinate arithmetic |
Constraint-based layout (Fixed, Fill, Min, Max, Percentage) — widgets place themselves |
| Colour portability (16 / 256 / True Color) |
TTuiColor supports Default terminal, Standard 16, xterm-256, and 24-bit RGB |
| Boilerplate for keyboard / mouse |
TTuiApp dispatches events, manages the focus ring, and handles Tab / Shift-Tab automatically |
| No reusable widgets | Ready-made library: Button, TextInput, Select, Checkbox, Table, ProgressBar, Tabs, Dialog, Toast … |
| Hard to theme consistently | Semantic TTuiTheme (Primary, Background, Surface, Text, …) — switch Dark ↔ Light at runtime |
| Emoji rendering breaks on grapheme clusters |
Blinki.Core.Unicode (TTuiUnicode) segments ZWJ sequences, skin tones, and flags as single glyphs; Blinki.Core.Emoji expands :shortcode: text |
| 🚀 Getting Started | Install, build, and write your first TUI in minutes |
| 🏗️ Architecture & Advanced Usage | Event loop, rendering pipeline, custom widgets |
| 🤝 Contributing | Style guide, coding standards, PR workflow |
The smallest possible Blinki application — a label that exits on Ctrl+Q:
program HelloBlinki;
{$APPTYPE CONSOLE}
uses
System.SysUtils,
Blinki.Core.App,
Blinki.Core.Input,
Blinki.Core.Widget,
Blinki.Widgets.Labels,
Blinki.Layout.Stack;
var
LApp: TTuiApp;
LRoot: TTuiVStack;
LLabel: TTuiLabel;
begin
ReportMemoryLeaksOnShutdown := True;
LApp := TTuiApp.Create;
LRoot := TTuiVStack.Create; // root widget — owns all children
try
LLabel := TTuiLabel.Create(LRoot); // parent receives ownership
LLabel.Text := ' Hello, Blinki! Press Ctrl+Q to quit.';
LApp.SetRoot(LRoot);
LApp.OnKeyPress := procedure(const AKey: TTuiKeyEvent)
begin
if (AKey.Code = kcChar) and (kmCtrl in AKey.Modifiers) and (AKey.Character = #17) then
LApp.Quit; // Ctrl+Q
end;
LApp.Run; // blocks until Quit is called; restores the terminal on exit
finally
LApp.Free; // frees App → frees LRoot → frees LLabel
end;
end.That is the complete program. No initialization file, no component registration, no form designer.
Add <repo>\Source to your project's Unit Search Path and compile.
Layout containers — Blinki.Layout.*
TTuiVStack · TTuiHStack · TTuiGrid · TTuiScrollable
Widgets — Blinki.Widgets.*
TTuiLabel · TTuiButton · TTuiBox · TTuiTextInput · TTuiTextArea ·
TTuiCheckbox · TTuiRadioButton · TTuiSelect · TTuiTabs · TTuiMenu ·
TTuiSidebar · TTuiTable · TTuiProgressBar · TTuiGauge · TTuiBarChart ·
TTuiSparkline · TTuiBadge · TTuiSpinner · TTuiToast · TTuiAlert ·
TTuiDialog · TTuiInputDialog · TTuiProgressDialog ·
TTuiMatrixRain · TTuiWaveAnimation · TTuiTypingEffect
FX & Animation — Blinki.FX.*
DrawGradient (Blinki.FX.Gradient) — true-color horizontal gradient on a text string, plus the
LerpColor helper it is built on.
Blinki is highly experimental and under active, heavy development. APIs may change between releases without notice.
| Item | Detail |
|---|---|
| Version | 0.1.0 |
| Licence | MIT |
| Delphi | 13.1 Florence (37.0) or later |
| Platform | Win32 console (Windows 10 build 10586+) |
| True Color | Windows 10 v1903+ (build 18362+) required |
| Linux / macOS | Linux64 supported via the real POSIX backend (termios raw mode, poll(2)); macOS and other POSIX systems are untested |
| Repository | github.com/marcobreveglieri/blinki |
Blinki v0.1.0 · MIT License · Copyright © 2026 Marco Breveglieri · GitHub · Home · Getting Started · Architecture · Contributing