Declarative styling + layout
Style, Border, Table, List, Tree, Layout::join, Place, multi-layer Canvas. Pure rendering — no I/O — so you can render frames inside a unit test.
composer require candycore/candy-sprinkles
use CandyCore\Sprinkles\{Style, Border, Layout, Position};
use CandyCore\Sprinkles\Table\Table;
use CandyCore\Core\Util\Color;
$banner = Style::new()
->bold()
->foreground(Color::hex('#ff5f87'))
->padding(0, 2)
->render('hello, candy world');
$table = Table::new()
->headers('Name', 'Age')
->row('Alice', '30')
->row('Bob', '25')
->border(Border::rounded())
->render();
echo Layout::joinVertical(Position::LEFT, $banner, $table);
with*() chain.Border::rounded(), thick(), double(), hidden(), normal(), ascii().joinHorizontal, joinVertical, place, placeOverlay for popovers.VHS-recorded GIFs of every example shipped with the library. Regenerated automatically on every push that touches the source.