Blocks/Canvas compositing

Canvas compositing

Paint styled text blocks at arbitrary (x, y) positions with z-index layering. Higher zIndex draws on top of lower ones at overlapping cells — perfect for dashboards, HUDs and overlapping panels.

Install the package

Every component ships in the single dart_tui package.

$dart pub add dart_tui
canvas compositing · dart_tui
Canvas compositing demo

Canvas

PropertyTypeDescription
Canvas(width, height)Create a compositing surface of the given size.
paint(x, y, block, {zIndex})Draw a (possibly multi-line, styled) block at a position.
render()Flatten all layers into a single styled string.

Related