# ngx-balance-text

> A simple directive to make use of the balance-text polyfill.

Latest version **0.9.1** (published 2019-09-28) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install ngx-balance-text
pnpm add ngx-balance-text
yarn add ngx-balance-text
bun add ngx-balance-text
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2019-09-28 |
| First published | 2019-04-07 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Simon Foster |
| Maintainers | simonf7 |
| Keywords | angular, javascript, typescript, directive |

## Links

- npm: https://www.npmjs.com/package/ngx-balance-text
- Repository: https://github.com/simonf7/ngx-balance-text
- Issues: https://github.com/simonf7/ngx-balance-text/issues
- npm.io page: https://npm.io/package/ngx-balance-text

## Dependencies (1)

- [balance-text](https://npm.io/package/balance-text.md) ^3.2.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.9.1 (latest) — 2019-09-28
- 0.9.0 — 2019-05-31
- 0.8.2 — 2019-04-23
- 0.8.1 — 2019-04-19
- 0.8.0 — 2019-04-19
- 0.7.0 — 2019-04-17
- 0.6.0 — 2019-04-07
- 0.5.1 — 2019-04-07
- 0.5.0 — 2019-04-07

## README

# NgxBalanceText

A simple Angular `directive` to integrate the `BalanceText` alternative text wrapping algorithm.

https://github.com/adobe-webplatform/balance-text

## Example

A simple example can be found under `src/app` directory of this repository.

## Installation

`npm i ngx-balance-text`

## Usage

1. Register the `NgxBalanceText` directive in your app module.
   > `import { NgxBalanceTextModule } from 'ngx-balance-text'`

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { NgxBalanceTextModule } from 'ngx-balance-text';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, NgxBalanceTextModule],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}
```

2. Use the directive in the required HTML elements.

```html
<p ngxBalanceText>
  This is some text that will be split evenly between lines.
</p>
```

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