Skip to content
docsv0.3.0

DividerRenderer

Horizontal divider rule with an optional inline label. `── label ────────────` Renders a single row; vertical orientation emits one column of `│` chars when the node bounds are taller than wide (rare but kept for symmetry). Node props (all optional): - `label` string Inline label rendered left-aligned after the rule. Default: ''. - `char` string Rule character. Default: '─' (horizontal), '│' (vertical). - `align` string 'left' | 'center' | 'right' — label alignment within the rule. Default: 'left'. - `orientation` string 'horizontal' | 'vertical'. Default: 'horizontal'.

DividerRenderer::supports()

public function supports(Milpa\Live\ValueObjects\Tui\TuiNode $node): bool

True only for `divider` nodes — dispatch is by declared node type, never by where the node came from.

Parameters

Parameters of supports()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode

DividerRenderer::render()

public function render(Milpa\Live\ValueObjects\Tui\TuiNode $node, Milpa\Live\ValueObjects\Tui\TuiRenderContext $context): Milpa\Live\ValueObjects\Tui\TuiFrame

Draws the rule across the full width, splitting it around the label when the node declares one.

Parameters

Parameters of render()
NameTypeDescription
$nodeMilpa\Live\ValueObjects\Tui\TuiNode
$contextMilpa\Live\ValueObjects\Tui\TuiRenderContext