Skip to content

sigwinhq/php-tui

 
 

Repository files navigation

PHP TUI

CI

         █████ 
     ████████████████████      
   █████████████████████████   
  █████ ███████████████████████   
  █████████████████████████████████
  █████████████████████████████   ██
  ███  ████████████████████████
  ███  ███████████████████████ 
  ███  ███████████████████████ 
  ███  ████ ████  ████  ██████ 

PHP TUI library heavily inspired by Rust TUI / Ratatui.

screenshot

Features

  • Many core features from Ratatui.
  • Advanced terminal control heavily inspired by Rust's crossterm library.
  • Font rendering
  • Layout control using the Cassowary algorithm via. php-tui cassowary

Documentation

Read the documentation here.

Demo

Checkout the project and run:

./example/demo/bin/demo

Screenshots

elephants starfield

Page from the PHP-TUI demo showing a scaled, scrolling text on a canvas with elephants on a starfield (framerate reduced for GIF)

image

Image rendering via. image magick

image

Colors demo

Widgets

  • Canvas
  • Chart
  • Block
  • Paragraph
  • List
  • Table
  • Tabs
  • Calendar
  • Barchart
  • Scrollbar
  • Sparkline
  • Gauge

Limitations

  • Windows support: shouldn't be hard to implement, but I don't have windows so...

TODO

  • Grapheme support
  • Cursor positioning after after draw (removed "frame" concept)
  • Change modifiers to use bitmask
  • Layout SegmentSize
  • Chart legend

Releases

No releases published

Packages

No packages published

Languages

  • HTML 74.9%
  • PHP 25.0%
  • Nix 0.1%