https://github.com/shwilliam/vue-responsive-text
↔ Vue component that scales its child node in relation to its parent node's width
https://github.com/shwilliam/vue-responsive-text
component resize responsive scale text vue
Last synced: 8 months ago
JSON representation
↔ Vue component that scales its child node in relation to its parent node's width
- Host: GitHub
- URL: https://github.com/shwilliam/vue-responsive-text
- Owner: shwilliam
- License: mit
- Created: 2018-10-12T04:10:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T04:39:22.000Z (almost 3 years ago)
- Last Synced: 2025-03-26T13:53:59.282Z (9 months ago)
- Topics: component, resize, responsive, scale, text, vue
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/vue-responsive-text
- Size: 417 KB
- Stars: 26
- Watchers: 1
- Forks: 2
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vue - vue-responsive-text - Vue component that scales its child node in relation to its parent node's width ` 📝 2 years ago` (UI Utilities [🔝](#readme))
- awesome-vue - vue-responsive-text - ↔ Component that scales its child node in relation to its parent node's width (UI Utilities / Resize)
- awesome-vue - vue-responsive-text - ↔ Component that scales its child node in relation to its parent node's width (Components & Libraries / UI Utilities)
README
# vue-responsive-text

> Vue component that scales its child node in relation to its parent node's width
[](https://codesandbox.io/s/zx70w1o8rp?module=%2Fsrc%2FApp.vue)
## Installation
Install the package from npm by running
```
$ npm i --save vue-responsive-text
```
or
```
$ yarn add vue-responsive-text
```
## Usage
Import the component as you would any other and place responsive text as the component's child.
```html
this text will scale
import VueResponsiveText from 'vue-responsive-text'
export default {
...
components: {
VueResponsiveText
}
};
```
## Props
|Prop |Type |Required|Default|Description |
|----------|-------|--------|-------|-------------------------|
|transition|number |false |0 |Transition duration in ms|
## Inspiration
This component was inspired by @foisonocean's ['react-dynamic-font'](https://www.npmjs.com/package/react-dynamic-font).
## Contributing
This project is open to and encourages contributions! Feel free to discuss any bug fixes/features in the [issues](https://github.com/shwilliam/vue-responsive-text/issues). If you wish to work on this project:
1. [Fork the project](https://github.com/shwilliam/vue-responsive-text/archive/master.zip)
2. Create your feature branch (`git checkout -b new-feature-branch`)
3. Commit your changes (`git commit -am 'add new feature'`)
4. Push to the branch (`git push origin new-feature-branch`)
5. [Submit a pull request!](https://github.com/shwilliam/vue-responsive-text/pull/new/master)