A Vue directive that implements unorphan.
yarn add vue-unorphan or npm install --save vue-unorphan
Vue = require('vue')
Vue.directive('unorphan', require('vue-unorphan'))
In nuxt.config.js
:
{
modules: [ 'vue-unorphan/nuxt/module' ]
}
Use in a Vue template like:
<h1 v-unorphan>A long title with many words that will wrap to multiple lines</h1>
Before:
After: