{"id":21525807,"url":"https://github.com/bkwld/vue-balance-text","last_synced_at":"2025-04-09T23:23:02.668Z","repository":{"id":39833725,"uuid":"131652503","full_name":"BKWLD/vue-balance-text","owner":"BKWLD","description":"A Vue directive that implements the \"balance-text\" package to create line breaks to make each line of text in an element equal.","archived":false,"fork":false,"pushed_at":"2023-05-01T16:54:45.000Z","size":71,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T17:51:29.514Z","etag":null,"topics":["directive","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BKWLD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-30T22:24:02.000Z","updated_at":"2023-01-05T23:58:16.000Z","dependencies_parsed_at":"2024-06-21T03:06:39.643Z","dependency_job_id":null,"html_url":"https://github.com/BKWLD/vue-balance-text","commit_stats":{"total_commits":34,"total_committers":5,"mean_commits":6.8,"dds":"0.17647058823529416","last_synced_commit":"62a8c8f1c84932a87a18119eff86cf621510ec7b"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-balance-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-balance-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-balance-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BKWLD%2Fvue-balance-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BKWLD","download_url":"https://codeload.github.com/BKWLD/vue-balance-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248126758,"owners_count":21052024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directive","vue"],"created_at":"2024-11-24T01:38:31.668Z","updated_at":"2025-04-09T23:23:02.637Z","avatar_url":"https://github.com/BKWLD.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-balance-text\n\nA Vue directive that implements [balance-text](https://github.com/adobe-webplatform/balance-text).  Here is [their demo page](http://adobe-webplatform.github.io/balance-text/demo/index.html).\n\n## Install\n\n```sh\nyarn add vue-balance-text\n# or\nnpm install --save vue-balance-text\n```\n\n#### Vue\n\n```js\nVue = require('vue')\nVue.directive('balance-text', require('vue-balance-text'))\n```\n\n#### Nuxt\n\nIn `nuxt.config.js`:\n\n```js\n{\n  modules: [ 'vue-balance-text/nuxt/module' ]\n}\n```\n\n## Usage\n\nUse in a Vue template like:\n\n```html\n\u003ch1 v-balance-text\u003eA long title with many words that will wrap to multiple lines\u003c/h1\u003e\n```\n\nWhen 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:\n\n```html\n\u003cdiv v-balance-text.children v-html='body'\u003e\u003c/div\u003e\n```\n\n## Example\n\nBefore:\n\n![](https://f.v1.n0.cdn.getcloudapp.com/items/3H0E09100O3443472P1S/Image%202018-04-30%20at%204.17.58%20PM.png)\n\nAfter:\n\n![](https://f.v1.n0.cdn.getcloudapp.com/items/2h0e2x312G2D1W2J2Y2J/Image%202018-04-30%20at%204.18.18%20PM.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-balance-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkwld%2Fvue-balance-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkwld%2Fvue-balance-text/lists"}