@matthesketh/ink-rule
v0.1.0
Published
A horizontal divider/separator for Ink 5 with optional centred label
Maintainers
Readme
@matthesketh/ink-rule
A horizontal divider/separator for Ink 5 with optional centred label.
Install
npm install @matthesketh/ink-ruleUsage
import { Rule } from '@matthesketh/ink-rule';
// simple horizontal rule
<Rule />
// with a centred title
<Rule title="Section" />
// custom character and colour
<Rule char="=" color="cyan" />
// fixed width
<Rule width={40} title="Info" />Props
| Prop | Type | Default | Description |
| ------- | -------- | -------------------------- | -------------------------------- |
| title | string | | centred label in the rule |
| char | string | '\u2500' | character used to draw the line |
| color | string | 'grey' | colour of the line characters |
| width | number | process.stdout.columns | width of the rule in columns |
License
MIT
