Introduction

TamboUI is a Java library for building terminal user interfaces. The design follows Rust’s ratatui closely - same rendering model, similar widget APIs, familiar layout system. If you know ratatui, you’ll pick this up quickly.

TamboUI is still experimental and under active development. APIs may change. Feedback, issues, and contributions are welcome!

Key Features

  • Immediate-mode rendering - Redraw the entire UI each frame for simple state management

  • Intermediate buffer system - Widgets render to a buffer, enabling diff-based terminal updates

  • Constraint-based layout - Flexible layout system with percentage, fixed, ratio, and proportional sizing

  • Multiple backends - JLine 3, Panama (FFM), and Aesh for cross-platform terminal support

  • High-level TUI framework - TuiRunner eliminates boilerplate with built-in event handling

  • Declarative Toolkit DSL - Fluent API for building UIs with components and focus management

  • PicoCLI integration - Optional module for CLI argument parsing

  • GraalVM native image support - Compile to native executables for instant startup

Module Overview

Module Description

tamboui-core

Core types: Buffer, Cell, Rect, Style, Layout, Text primitives, and layout widgets (Columns, Grid, Dock, Stack, Flow)

tamboui-widgets

All widget implementations (Block, Paragraph, List, Table, Chart, etc.)

tamboui-jline

JLine 3 terminal backend

tamboui-panama-backend

Panama (FFM) terminal backend for modern JDKs

tamboui-aesh-backend

Aesh terminal backend

tamboui-tui

High-level TUI framework with TuiRunner, event handling, bindings, and key helpers

tamboui-toolkit

Fluent DSL for declarative UI construction with components and focus management

tamboui-css

CSS-based styling with TCSS format, selectors, and theme switching

tamboui-annotations

Annotation definitions (@OnAction) for action handling

tamboui-processor

Annotation processor for compile-time action handler generation

tamboui-image

Image rendering with Kitty, iTerm, Sixel, and braille protocols

tamboui-picocli

Optional PicoCLI integration for CLI argument parsing

Where to Start

Building a full-screen TUI application? Start with Getting Started, then move to the Toolkit DSL section. From there, explore Forms, CSS Styling, and Bindings as needed.

Building a CLI tool with progress output? See Inline Toolkit for npm/Gradle-style progress displays.

Want to understand the internals? Read Core Concepts first, then explore Immediate Mode or TuiRunner.

Foundations

Building Blocks

These work at any API level:

Toolkit DSL

Advanced

Quick Example

Here’s a minimal example using the Toolkit DSL:

import static dev.tamboui.toolkit.Toolkit.*;
import dev.tamboui.toolkit.app.ToolkitApp;
import dev.tamboui.toolkit.element.Element;

public class HelloTamboUI extends ToolkitApp {

    @Override
    protected Element render() {
        return panel("Hello",
            text("Welcome to TamboUI!").bold().cyan(),
            spacer(),
            text("Press 'q' to quit").dim()
        ).rounded();
    }

    public static void main(String[] args) throws Exception {
        new HelloTamboUI().run();
    }
}

Resources

License

TamboUI is released under the MIT License.