# textwithnewlines

> A React Component for turning text with newlines into semantic paragraphs

Latest version **1.1.0** (published 2019-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install textwithnewlines
pnpm add textwithnewlines
yarn add textwithnewlines
bun add textwithnewlines
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-12-11 |
| First published | 2019-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 82 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jon Kuperman |
| Maintainers | jkup |
| Keywords | react, newline, break, text, split, paragraph |

## Links

- npm: https://www.npmjs.com/package/textwithnewlines
- Repository: https://github.com/jkup/TextWithNewlines
- Homepage: https://github.com/jkup/TextWithNewlines#readme
- Issues: https://github.com/jkup/TextWithNewlines/issues
- npm.io page: https://npm.io/package/textwithnewlines

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-12-11
- 1.0.2 — 2019-12-08
- 1.0.1 — 2019-12-08
- 1.0.0 — 2019-12-08
- 0.1.0 — 2019-12-08

## README

# TextWithNewlines

A React Component for turning text with newlines into semantic paragraphs.

## Installation

```sh
npm install --save textwithnewlines
```

## Usage

```js
import TextWithNewlines from "textwithnewlines";

const sampleText = `The first paragraph

Another paragraph.

A third paragraph`;

class App extends React.Component {
  render() {
    return <TextWithNewlines>{sampleText}</TextWithNewlines>;
  }
}
```

Which will output:

```html
<div>
  <p>
    First Paragraph
  </p>
  <p>
    Second Paragraph
  </p>
  <p>
    Third Paragraph
  </p>
</div>
```

---
_Source: https://npm.io/package/textwithnewlines · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
