1 unstable release

0.1.0 Mar 22, 2022

#256 in #tui



A component-based framework for building Rust TUIs

The superconsole framework provides a powerful line based abstraction over text based rendering to the terminal. It also provides basic building blocks like line manipulation, and a higher level of composable components. A base set of "batteries" components are included to help developers create TUIs as quickly as possible.

The design choices that underly superconsole are selected to prioritize testability, ease of composition, and flexibility.

Superconsole also offers stylization, including italics, underlining, bolding, and coloring text. Furthermore, relying on crossterm ensures that it is compatible with Windows, Unix, and MacOS.

Finally, superconsole delineates between rendering logic and program state - each render call accepts an immutable reference to state, which components may use to inject state into their otherwise immutable rendering logic.


Superconsole running some buck2 tests


use std::convert::TryInto;
use superconsole::{
    components::bordering::{Bordered, BorderedSpec},
    state, Component, Dimensions, DrawMode, Line, State, SuperConsole,

struct HelloWorld;

impl Component for HelloWorld {
    fn draw_unchecked(
        _state: &State,
        _dimensions: Dimensions,
        _mode: DrawMode,
    ) -> anyhow::Result<Vec<Line>> {
        Ok(vec![vec!["hello world"].try_into()?])

pub fn main() -> anyhow::Result<()> {
    let bordering = BorderedSpec::default();
    let mut superconsole =
        SuperConsole::new(Box::new(Bordered::new(Box::new(HelloWorld), bordering)))
            .ok_or_else(|| anyhow::anyhow!("Not a TTY"))?;

See the CONTRIBUTING file for how to help out.


Superconsole is both MIT and Apache License, Version 2.0 licensed, as found in the LICENSE-MIT and LICENSE-APACHE files.


~328K SLoC