vadimdemedes / ink

🌈 React for interactive command-line apps
https://term.ink
MIT License
26.42k stars 593 forks source link

Control visibility of individual border sides #568

Closed vadimdemedes closed 1 year ago

vadimdemedes commented 1 year ago

This is a continuation of https://github.com/vadimdemedes/ink/pull/431, thank you @kosciolek for this contribution!

This PR adds 4 new props to Box: borderTop, borderRight, borderBottom and borderLeft. They are all boolean props and they default to true. They let you control visibility of each border side.

For example, this won't show the left border:

<Box borderStyle="round" borderLeft={false}>
  <Text>Hello world</Text>
</Box>