Skip to content
Projects

About

Agnostic terminal GUI library for TypeScript, distributed with a native React renderer

Developer Tools

How these counts are measured

What you can do

  • Framework-agnostic API
  • Advanced layout positioning

Measured star growth

in 24h
0
in 7 days
0
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Terminosaurus is a DOM-like UI library for TypeScript that makes it easy to build powerful graphical interfaces for your terminal without having to deal with complex positioning or state updates.

Features

  • Framework-agnostic API
  • React renderer
  • Advanced layout positioning
  • Event handlers
  • Text wrapping
  • CSS properties
  • Fast rendering

Getting Started

Framework Agnostic React Syntax
import {
    TermElement,
    TermText,
    run,
} from 'terminosaurus';

run({}, async screen => {
    const text = new TermText();
    text.appendTo(screen.rootNode);

    let counter = 0;

    const increaseCounter = () => {
        counter += 1;
        text.setText(`Counter: ${counter}`);
    };

    text.onClick.addEventListener(() => {
        increaseCounter();
    });

    increaseCounter();
});
import {
    useState
} from 'react'
import {
    render,
} from 'terminosaurus/react';

function App() {
    const [counter, setCounter] = useState(0);

    const increaseCounter = () => {
        setCounter(counter + 1);
    };

    return (
        <term:div onClick={increaseCounter}>
            Counter: {counter}
        </term:div>
    );
}

render({}, <App/>);

Explore related projects

Loading…