Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-five-star-input

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-five-star-input

vuejs five star rating input

  • 0.1.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

vue-five-star-input

Use this Five Star Input in your vue projects to easily get user input using stars. You can easily adjust the colour and height of the star icons to fit your project. Use the name prop to give your input field a name for the form you put it in. It uses a hidden input field with that name and the value of the stars selected.

Project setup

npm install --save vue-five-star-input

Usage

Import into your Vue project

import FiveStarInput from 'vue-five-star-input';
export default { 
    components: {
        FiveStarInput,
    }
}

Use in your project

<five-star-input name="customer-review" value="3" />

Props:

name: The name of the input field

value: (optional) Default value of the five stars (0-5)

required: (optional. default=false). Boolean whether the input field is required

Styling:

Style the stars using the .star class. You can change the color and height of the icons.

Example

image of five star input asking for a review

<template>
  <div id="app">
    <p>Please rate your experience</p> 
    <five-star-input name="test" value="3" :required="true"/>
  </div>
</template>

<script>
import FiveStarInput from 'vue-five-star-input'
export default {
  components: {
    FiveStarInput
  }
}
</script>

<style>
...
.star {
  color: goldenrod;
  height: 30px;
}
</style>

FAQs

Package last updated on 14 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc