Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wheatjs/vue-hako
https://github.com/wheatjs/vue-hako
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wheatjs/vue-hako
- Owner: wheatjs
- License: mit
- Created: 2021-06-08T01:22:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-08T03:06:01.000Z (over 3 years ago)
- Last Synced: 2024-10-14T00:37:22.646Z (about 1 month ago)
- Language: TypeScript
- Size: 112 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A Vue Component to proportionally scale your content## Installation
```bash
npm i vue-hako
```## Usage
Register the component to be used anywhere in your app.
Inside of `main.js`
```ts
import { createApp } from 'vue'
import { HakoPlugin } from 'vue-hako'
import App from './App.vue'createApp(App)
.use(Hako)
.mount('#app')
```Or import the component on a per-component basis.
Inside of your component
```htmlimport { Hako } from 'vue-hako'
...
```
Using the component
```html
import { ref } from 'vue'
const disableScaling = ref(false)
const width = ref(1920)
const height = ref(1080)
This content will scale to its container
```
## License
[MIT License](https://github.com/jacobclevenger/vue-hako/blob/main/LICENSE) © 2021-PRESENT [Jacob Clevenger](https://github.com/jacobclevenger)