{"id":22485233,"url":"https://github.com/JayeshLab/vue3-resize-text","last_synced_at":"2025-08-02T18:31:51.670Z","repository":{"id":127851943,"uuid":"388371578","full_name":"JayeshLab/vue3-resize-text","owner":"JayeshLab","description":"A vue3 directive which automatically resize font size based on element width.","archived":false,"fork":false,"pushed_at":"2021-07-24T05:44:17.000Z","size":98,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-14T16:04:45.703Z","etag":null,"topics":["directive","vue","vue3"],"latest_commit_sha":null,"homepage":"https://jayeshlab.github.io/vue3-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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-22T07:39:20.000Z","updated_at":"2023-09-01T05:58:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"cda39ebb-768a-44ab-9008-c9efa688d479","html_url":"https://github.com/JayeshLab/vue3-resize-text","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"a871c3ac547bbaebe60471800be0c9b2cf3b2e6f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue3-resize-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue3-resize-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue3-resize-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayeshLab%2Fvue3-resize-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayeshLab","download_url":"https://codeload.github.com/JayeshLab/vue3-resize-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228499927,"owners_count":17929986,"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","vue3"],"created_at":"2024-12-06T17:12:15.073Z","updated_at":"2025-08-02T18:31:51.658Z","avatar_url":"https://github.com/JayeshLab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Vue3 Resize Text\n\nA vue3 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/vue3-resize-text.svg?style=flat-square)](https://www.npmjs.com/package/vue3-resize-text)\n[![npm](https://img.shields.io/npm/dt/vue3-resize-text.svg?style=flat-square)](https://www.npmjs.com/package/vue3-resize-text)\n[![Build Status](https://www.travis-ci.com/JayeshLab/vue3-resize-text.svg?branch=master\u0026status=passed)](https://travis-ci.org/JayeshLab/vue3-resize-text)\n[![npm](https://img.shields.io/npm/l/vue3-resize-text.svg?style=flat-square)](http://opensource.org/licenses/MIT)\n\n[Live Demo](https://jayeshlab.github.io/vue3-resize-text/index.html): Resize the browser viewport to see the effect in action\n\nFor vue.js 2.x see the [vue-resize-text](https://github.com/JayeshLab/vue-resize-text \"vue-resize-text\")\n\n\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 vue3-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/vue3-resize-text\"\u003e\u003c/script\u003e\n```\n\n#### Global\n\nRegister VueResizeText globally:\n\n### Use\n```javascript\nimport { createApp } from \"vue\"\nimport App from \"./App.vue\"\nimport VueResizeText from \"vue3-resize-text\"\n\nconst app = createApp(App)\napp.use(VueResizeText)\n```\nor using directive\n\n```javascript\nimport { createApp } from \"vue\"\nimport App from \"./App.vue\"\nimport VueResizeText from \"vue3-resize-text\"\n\nconst app = createApp(App)\napp.directive('ResizeText', VueResizeText.ResizeText);\n```\n\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 VueResizeText from 'vue3-resize-text'\nexport default {\n directives: {\n    ResizeText: VueResizeText.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 VueResizeText from 'vue3-resize-text'\n  export default {\n    directives: {\n        ResizeText: VueResizeText.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%2Fvue3-resize-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJayeshLab%2Fvue3-resize-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJayeshLab%2Fvue3-resize-text/lists"}