https://github.com/ammezie/vue-favorite
A Vue favorite/like/recommend component
https://github.com/ammezie/vue-favorite
vuejs2
Last synced: 17 days ago
JSON representation
A Vue favorite/like/recommend component
- Host: GitHub
- URL: https://github.com/ammezie/vue-favorite
- Owner: ammezie
- License: mit
- Created: 2017-01-09T11:21:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T14:26:19.000Z (about 8 years ago)
- Last Synced: 2025-04-10T11:27:18.422Z (20 days ago)
- Topics: vuejs2
- Language: JavaScript
- Homepage:
- Size: 232 KB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-favorite
A Vue favorite/like/recommend component.
> Note: vue-favorite uses font-awesome by default and you will be required to pull it in your templates.
## Installation
```
npm install vue-favorite
```## Usage
```
import Vue from 'vue'
import Favorite from 'vue-favorite'new Vue({
el: '#app',
components: { Favorite }
})
```## Browser Usage
```
new Vue({
el: '#app',
components: { Favorite }
})
```After that, you can use it in your templates:
```
```
## Props
| Name | Required | Type | Decsription |
|------|:--------:|------|-------------|
| post | Y |Number| ID of the post
| favorited | Y |Boolean| determine whether the post has been marked as favorite## Build Setup
``` bash
# install dependencies
npm install# serve with hot reload at localhost:8080
npm run dev# build for production with minification
npm run build
```