Add <Newline> and <Spacer> components
See original GitHub issueThis question might make zero sense in the context of terminals, but would Ink consider adding support for the break line (<br/>
) tag?
This would replace the need to use {'\n'}
for new lines, though CMIIW and there is already a better way to add newlines to text in Ink! Might be that most use-cases should just use flex
/margin
/height
, but that seems to quickly become verbose in my experiences so far.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Add breaks and lines to your content - OpenClassrooms
This is what we'll cover in this chapter. Line breaks. Paragraphs are block-level elements, meaning they take up the width of their containing ......
Read more >Stop using margin, use Spacer component instead!
First of all, I would say it is not good to use margin on the component's top-level, because it breaks the isolation of...
Read more >How to add new line in Markdown presentation?
When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then...
Read more >Injecting a Line Break | CSS-Tricks
You can insert line breaks via pseudo element. It's easy: h1 span::before { content: "\A"; }. But… the <span> is an inline element....
Read more >Add a Line Break in HTML - Tutorial - TeachUcomp, Inc.
This tutorial shows you how to add a line break in HTML. By default, browsers ignore many formatting keystrokes that we take for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Added
<Spacer>
via https://github.com/vadimdemedes/ink/commit/e8ae2af76ec2b23a0b700f0c153e25579f2bcd3d. Going to keep this issue open until Ink 3 is out.If we decide to add this, which I personally think could be useful, it should be something like
<Newline/>
and not<br/>
as we also moved away from using<div>
and<span>
.