sigwinhq / php-tui

PHP TUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

PHP TUI


Languages

Language:HTML 74.9%Language:PHP 25.0%Language:Nix 0.1%