A pi.dev component and utility library.
Customizable, well-tested and easy to use components and utilities for pi.dev extensions development.
bun add @mohndoe/pi-tui-extras
npm install @mohndoe/pi-tui-extras
pnpm add @mohndoe/pi-tui-extras
yarn add @mohndoe/pi-tui-extras- BorderBox -- Bordered container with configurable style, titles, footers, and padding.
Table(coming soon)FlexLayout(coming soon)Scrollbar(coming soon)
See all components here.
truncate-- Fit string to a maximum visible width, appending "…".padLine-- Right-pad a string with spaces to reach a target width.alignInWidth-- Left, center, or right-align text within a fixed width.alignInWidthLR-- Position two strings at opposite ends of a fixed width.
See all all utilities here.
Early development. BorderBox is stable and tested. More components coming, including: tables, flex layout, scrollbar, etc.
This project follows the conventions in CONTEXT.md and AGENTS.md. Tests are co-located (*.test.ts next to source) and use vitest.
- Branch from
maininto afeat/orfix/prefix - Write tests before implementation (TDD)
- Run
bun testbefore opening a PR - Open a PR
MIT — see LICENSE.