A Vue directive that implements balance-text
npm install vue-balance-textA Vue directive that implements balance-text. Here is their demo page.
yarn add vue-balance-text or npm install --save vue-balance-text
#### Vue
``js`
Vue = require('vue')
Vue.directive('balance-text', require('vue-balance-text'))
#### Nuxt
In nuxt.config.js:
`js`
{
modules: [ 'vue-balance-text/nuxt/module' ]
}
Use in a Vue template like:
`html`A long title with many words that will wrap to multiple lines
When rendering HTML with v-html, you need to tell v-balance-text to operate on the children vs on the element it's attached to:
`html``
Before:

After:
