An open API service indexing awesome lists of open source software.

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

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
```