{"id":20198178,"url":"https://github.com/jayeshlab/vue-resize-text","last_synced_at":"2025-08-21T23:32:40.499Z","repository":{"id":54938704,"uuid":"157207050","full_name":"JayeshLab/vue-resize-text","owner":"JayeshLab","description":"A vue directive which automatically resize font size based on element width.","archived":false,"fork":false,"pushed_at":"2022-11-17T03:44:55.000Z","size":298,"stargazers_count":70,"open_issues_count":12,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T08:16:01.871Z","etag":null,"topics":["fittext","font","rescale","resize","responsive","text","vue","vuejs"],"latest_commit_sha":null,"homepage":"https://jayeshlab.github.io/vue-resize-text/index.html","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/JayeshLab.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}},"created_at":"2018-11-12T12:01:13.000Z","updated_at":"2024-03-17T17:24:19.000Z","dependencies_parsed_at":"2023-01-23T19:30:40.146Z","dependency_job_id":null,"html_url":"https://github.com/JayeshLab/vue-resize-text","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue-resize-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue-resize-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue-resize-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue-resize-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayeshLab","download_url":"https://codeload.github.com/JayeshLab/vue-resize-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542287,"owners_count":18242332,"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":["fittext","font","rescale","resize","responsive","text","vue","vuejs"],"created_at":"2024-11-14T04:29:38.498Z","updated_at":"2024-12-20T06:06:02.806Z","avatar_url":"https://github.com/JayeshLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue Resize Text\n\nA vue directive which automatically resize font size based on element width.\n\nIt makes the font-size flexible on fluid or responsive layout.\n\n\n[![npm](https://img.shields.io/npm/v/vue-resize-text.svg?style=flat-square)](https://www.npmjs.com/package/vue-resize-text)\n[![npm](https://img.shields.io/npm/dt/vue-resize-text.svg?style=flat-square)](https://www.npmjs.com/package/vue-resize-text)\n[![Build Status](https://travis-ci.org/JayeshLab/vue-resize-text.svg?branch=master)](https://travis-ci.org/JayeshLab/vue-resize-text)\n[![npm](https://img.shields.io/npm/l/vue-resize-text.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\n[Live Demo](https://jayeshlab.github.io/vue-resize-text/index.html): Resize the browser viewport to see the effect in action\n\nFor Vue.js 3.x see the [vue3-resize-text](https://github.com/JayeshLab/vue3-resize-text \"vue3-resize-text\")\n\n![vue-resize-text](https://user-images.githubusercontent.com/36194663/48419503-21935780-e77e-11e8-8a2f-6a1c9e33f740.gif)\n\n## Installation\n\nInstall via NPM\n\n`$ npm install vue-resize-text --save`\n\nInstall via CDN\n\n```html\n\u003cscript src=\"https://unpkg.com/vue\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/vue-resize-text\"\u003e\u003c/script\u003e\n```\n\n#### Global\n\nRegister VueResizeText globally:\n\n```javascript\nimport Vue from 'Vue';\nimport VueResizeText from 'vue-resize-text';\n\nVue.use(VueResizeText)\n```\nDirective ```v-resize-text``` then can be used in any of Component\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv v-resize-text\u003eHello Vue\u003c/div\u003e\n\u003c/template\u003e\n```\n\n#### Local\n\nInclude the VueResizeText  directive directly into your component using import:\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv v-resize-text\u003eHello Vue\u003c/div\u003e\n\u003c/template\u003e\n\u003cscript\u003e\nimport ResizeText from 'vue-resize-text'\nexport default {\n directives: {\n    ResizeText\n }\n}\n\u003c/script\u003e\n```\n\n### Usage\n\n#### Basic usage\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cdiv v-resize-text=\"{ratio:1.3, minFontSize: '30px', maxFontSize: '100px', delay: 200}\"\u003eHello Vue\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  import ResizeText from 'vue-resize-text'\n  export default {\n    directives: {\n        ResizeText\n     }\n  };\n\u003c/script\u003e\n```\n\n### Directive Arguments\n`v-resize-text=\"{ratio:1.5, minFontSize: '30px', maxFontSize: '100px', delay: 200}\"`\n\n| Argument         | Description                 |  Type         |  Default     | \n| -----------      | ---------------             | ------------  | ------------ | \n|  ratio           |  Font Ratio is the tweek to make the text resize properly, greater then `1` makes the font smaller and less then `1` make the font bigger | Number        |     1       |\n|  minFontSize     |  Minimum font-size threshold in px| Number/String |     16px or 16       |      -            |\n|  maxFontSize     |  Maximum font-size threshold in px| Number/String  |     500px  or 500      |      -         |\n|  delay           |  Debound time delay on window resize | Number        |  200   |      -        |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayeshlab%2Fvue-resize-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayeshlab%2Fvue-resize-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayeshlab%2Fvue-resize-text/lists"}