pretty-break
v1.0.3
Published
When a title is too long to fit into its container, pretty-break breaks it nicely in to lines of roughly equal length.
Downloads
9
Readme
pretty-break
When a title is too long to fit into its container, pretty-break breaks it nicely in to lines of roughly equal length.
Example:
This title is too long to fit inside its container
Becomes:
This title is too long to fit inside its container
Install
npm i --save pretty-break
Usage
import { prettybreak } from 'pretty-break';
const targets = document.getElementsByClassName('break-me-nicely');
for (var i = 0; i < targets.length; i++) {
prettyBreak(targets[i]);
}