Documentation

tui.builders is a visual drag-and-drop editor for designing terminal interfaces. It currently generates production-ready Rust code for SuperLightTUI (SLT), with additional framework support planned.

How to use

  1. Open the editor.
  2. Pick a template or start from a blank project.
  3. Add widgets from the palette.
  4. Customize props, layout, and style in the inspector.
  5. Export generated Rust code.

Prerequisites: Install Rust and ensure cargo is available in your shell.

Editor Guide

Palette

Drag widgets into the tree or click to insert at the current selection.

Canvas

Live visual terminal preview of your current widget tree.

Inspector

Edit widget props, flex layout values, and style tokens in one place.

Code Preview

See generated Rust updates in real time while editing.

Export

Download as a Cargo project zip, export a single .rs file, or copy code to clipboard.

Widget Catalog

All available widgets grouped by category.

Layout (8)

WidgetSLT FunctionDescriptionFrameworks
Containerui.container().col(...) / ui.row(...)Flexible parent container with border, spacing, and layout controls.SLTInk
Spacerui.spacer()Consumes remaining space to align surrounding content.SLTInk
Separatorui.separator()Draws a horizontal divider line.SLTInk
Scrollableui.scrollable(&mut state)Adds scroll behavior to tall content regions.SLTInk
Screenui.screen(...)SLT
Gridui.grid(cols, ...)Places children into a responsive multi-column layout.SLTInk
Divider Textui.divider_text(label)Renders a labeled section divider.SLTInk
Accordionui.accordion(title, &mut open, ...)Expandable section for progressively revealed content.SLTInk

Text (4)

WidgetSLT FunctionDescriptionFrameworks
Textui.text(value)Renders plain terminal text.SLTInk
Markdownui.markdown(value)Renders markdown with SLT inline formatting.SLTInk
Linkui.link(label, url)Creates clickable terminal hyperlinks (OSC 8).SLTInk
Code Blockui.code_block(value)Shows syntax-styled code snippets.SLTInk

Input (11)

WidgetSLT FunctionDescriptionFrameworks
Text Inputui.text_input(&mut state)Single-line text entry field.SLTInk
Textareaui.textarea(&mut state, rows)Multi-line text editing area.SLTInk
Buttonui.button(label)Clickable action trigger with variant support.SLTInk
Sliderui.slider(label, &mut value, min..=max)Adjusts a numeric value over a range.SLTInk
Confirmui.confirm(question, &mut state)Binary confirmation interaction.SLTInk
Checkboxui.checkbox(label, &mut checked)Boolean option toggle with checkmark UI.SLTInk
Toggleui.toggle(label, &mut on)Switch-style boolean control.SLTInk
Selectui.select(&mut state)Dropdown-style single choice selector.SLTInk
Radioui.radio(&mut state)Mutually exclusive option set.SLTInk
Multi-Selectui.multi_select(&mut state)Selects multiple options from a list.SLTInk
Calendarui.calendar(...)SLT

Data (8)

WidgetSLT FunctionDescriptionFrameworks
Tableui.table(&mut state)Structured rows and columns with selection support.SLTInk
Listui.list(&mut state)Vertical selectable list for menu-like flows.SLTInk
Treeui.tree(&mut state)Hierarchical expandable node viewer.SLTInk
Dir Treeui.directory_tree(...)SLT
File Pickerui.file_picker(...)SLT
Virtual Listui.virtual_list(&mut state, visible, ...)Virtualized list for large datasets.SLT
Statui.stat(label, value)Compact metric card with optional trend/color variants.SLTInk
Def. Listui.definition_list(&[(term, value)])Aligned key/value detail list.SLTInk

Navigation (5)

WidgetSLT FunctionDescriptionFrameworks
Tabsui.tabs(&mut state)Tabbed navigation across content panes.SLTInk
Cmd Paletteui.command_palette(&mut state)Searchable command launcher overlay.SLT
Help Barui.help(&[(key, desc)])Bottom helper bar for key bindings.SLTInk
Breadcrumbui.breadcrumb(&[segments])Path-style navigation trail.SLTInk
Key Hintui.key_hint(key)Inline keyboard hint chip.SLTInk

Feedback (10)

WidgetSLT FunctionDescriptionFrameworks
Progressui.progress(value)Minimal progress meter.SLTInk
Progress Barui.progress_bar(value, width)Width-controlled progress bar.SLTInk
Spinnerui.spinner(&state)Animated loading indicator.SLTInk
Toastui.toast(&mut state)Timed notification stack.SLTInk
Timerui.timer_display(...)SLT
Rich Logui.rich_log(...)SLT
Tooltipui.tooltip(...)SLTInk
Alertui.alert(message, level)Inline severity callout banner.SLTInk
Badgeui.badge(label)Compact status or metadata label.SLTInk
Empty Stateui.empty_state(title, subtitle)Placeholder content for empty screens.SLTInk

Data Visualization (7)

WidgetSLT FunctionDescriptionFrameworks
Bar Chartui.bar_chart(&[(label, value)], h)Comparative categorical bar visualization.SLTInk
Sparklineui.sparkline(&values, width)Tiny inline trend graph.SLTInk
Chartui.chart(builder, w, h)Configurable chart builder for multiple series.SLT
Candlestickui.candlestick(&candles, up, down)OHLC market-style chart rendering.SLT
Heatmapui.heatmap(&grid, w, h, low, high)Color-intensity matrix visualization.SLT
Scatterui.scatter(&points, w, h)Plots point distributions on two axes.SLT
Histogramui.histogram(&values, w, h)Frequency distribution buckets.SLT

Overlay (2)

WidgetSLT FunctionDescriptionFrameworks
Modalui.modal(|ui| { ... })Dimmed overlay dialog layer.SLTInk
Overlayui.overlay(|ui| { ... })Floating content layer without dimming.SLTInk

AI (3)

WidgetSLT FunctionDescriptionFrameworks
Streaming Textui.streaming_text(&mut state)Token-by-token text stream output.SLT
Stream MDui.streaming_markdown(&mut state)Streaming markdown renderer.SLT
Context Barui.context_bar(&items)Context token/source chips for AI workflows.SLTInk

Form (1)

WidgetSLT FunctionDescriptionFrameworks
Form Fieldui.form_field(&mut field)Composable form input field unit.SLTInk

Media (2)

WidgetSLT FunctionDescriptionFrameworks
Sixel Imageui.sixel_image(...)SLT
Imageui.image(&img)Half-block image rendering from RGBA data.SLT

Code Generation

tui.builders transforms your editor tree into Rust through generateRustCode() and emits a ready-to-run main.rs targeting SLT v0.17.1 with slt::run_with() and RunConfig.

Example: container + text + button

use slt::*;
use std::time::Duration;

fn main() -> std::io::Result<()> {
    let config = RunConfig::default()
        .theme(Theme::dark())
        .mouse(true)
        .tick_rate(Duration::from_millis(16));

    slt::run_with(
        config,
        |ui: &mut Context| {
            if ui.key('q') { ui.quit(); }

            ui.bordered(Border::Rounded).pad(1).gap(1).col(|ui| {
                ui.text("Hello from tui.builders").bold().fg(Color::Cyan);
                if ui.button("Click me").clicked {
                    // handle click
                }
                ui.help(&[("q", "quit")]);
            });
        },
    )
}

Running Your Code

All code generated by tui.builders compiles directly against SuperLightTUI. Here's how to run it.

Option 1: Export as Cargo project (.zip)

Click Export → Cargo Project in the editor toolbar. Unzip and run:

unzip my-tui-app.zip
cd my-tui-app
cargo run

Option 2: Export as .rs file

Click Export → .rs File. Create a Cargo project manually:

cargo new my-tui-app
cd my-tui-app
cargo add superlighttui
# Replace src/main.rs with your exported file
cargo run

Option 3: Copy to clipboard

Click Export → Copy. Paste into an existing Cargo project with superlighttui as a dependency.

# In your Cargo.toml:
[dependencies]
superlighttui = "0.17.1"
Note: Rust and Cargo must be installed. All generated code targets SLT v0.17.1 and is verified to compile via automated testing. Press q to quit the running TUI app.

Templates

tui.builders ships with 25 templates spanning dashboards, forms, navigation flows, and operational tooling.

Keyboard Shortcuts

qQuit in generated TUI apps.
TabMove focus to the next widget.
EnterSelect or activate focused controls.
Ctrl+CExit the app immediately.

Supported Frameworks

tui.builders generates code for multiple TUI frameworks. SuperLightTUI is fully supported, and Ink is available in Beta.

Supported
SuperLightTUI (Rust) · v0.17.1

Immediate-mode, zero-unsafe, flexbox layout, 50+ widgets, theming, animation, AI-native widgets

Beta
Ink (TypeScript) · v6

React-based terminal UI framework by Vadim Demedes. Now available in Beta with 37+ widgets.

Planned
Ratatui (Rust) · Textual (Python) · Bubbletea (Go)