question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add <Newline> and <Spacer> components

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vadimdemedescommented, May 31, 2020

Added <Spacer> via https://github.com/vadimdemedes/ink/commit/e8ae2af76ec2b23a0b700f0c153e25579f2bcd3d. Going to keep this issue open until Ink 3 is out.

1reaction
sindresorhuscommented, Sep 16, 2019

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>.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found