Getting started
Installation
npm install effect-boxes effectBasic usage
import * as Box from "effect-boxes/Box";
import { pipe } from "effect";
// Create a simple text box
const hello = Box.text("Hello, World!");
// Render to string
console.log(Box.render(hello));
// Hello, World!Composition
Boxes compose horizontally and vertically:
const row = Box.hcat([Box.text("Left"), Box.text("Right")], Box.top);
const col = Box.vcat([Box.text("Top"), Box.text("Bottom")], Box.left);All operations are pure: they return new boxes without mutating the originals.
Next steps
- What is Box? for the mental model and how the library works
- Using Box for the full API walkthrough
- Directory Tree tutorial to build something real