All Projects → kartik-v → Bootstrap Star Rating

kartik-v / Bootstrap Star Rating

Licence: other
A simple yet powerful JQuery star rating plugin with fractional rating support.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bootstrap Star Rating

Rateit.js
Rating plugin for jQuery. Fast, Progressive enhancement, touch support, icon-font support, highly customizable, unobtrusive JavaScript (using HTML5 data-* attributes), RTL support, supports as many stars as you'd like, and also any step size.
Stars: ✭ 146 (-85.18%)
Mutual labels:  star, rating, jquery
Starrate
swift电商五星评价,星星评分控件,支持自定义数量、拖拽、间隔、设置最小星星数等操作
Stars: ✭ 85 (-91.37%)
Mutual labels:  star, rating
Mgstarratingview
MGStarRatingView is a view for rating.
Stars: ✭ 70 (-92.89%)
Mutual labels:  star, rating
Raty
🌟 Raty - A Star Rating Plugin
Stars: ✭ 2,292 (+132.69%)
Mutual labels:  star, rating
Emotion Ratings
😠 😞 😑 😊 😍 This plugin allows you to create ratings using emojis
Stars: ✭ 37 (-96.24%)
Mutual labels:  rating, jquery
Laravel Reactions
Laravel reactions package for implementing reactions (eg: like, dislike, love, emotion, etc) on Eloquent models.
Stars: ✭ 58 (-94.11%)
Mutual labels:  star, rating
Android Ratingreviews
Simple star rating system bars, a view similar to the ones seen on Google Playstore. ⭐🌟✨
Stars: ✭ 110 (-88.83%)
Mutual labels:  star, rating
Yii2 Widget Rating
A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)
Stars: ✭ 47 (-95.23%)
Mutual labels:  star, rating
rater-js
Star rating widget for the browser. Unlimited number of stars. No dependencies. No Jquery required.
Stars: ✭ 66 (-93.3%)
Mutual labels:  rating, star
react-star-ratings
A customizable svg star rating component for selecting x stars or visualizing x stars
Stars: ✭ 128 (-87.01%)
Mutual labels:  rating, star
Andratingbar
A RatingBar library for android, you can customize size ,color ,spacing and image easily!Support right to left。效果可以参看:https://juejin.im/post/6844904143220391949
Stars: ✭ 582 (-40.91%)
Mutual labels:  star, rating
Laravel Love
Add Social Reactions to Laravel Eloquent Models. It lets people express how they feel about the content. Fully customizable Weighted Reaction System & Reaction Type System with Like, Dislike and any other custom emotion types. Do you react?
Stars: ✭ 822 (-16.55%)
Mutual labels:  star, rating
Gentelella Rtl
Free RTL Bootstrap 3 Admin Template
Stars: ✭ 194 (-80.3%)
Mutual labels:  rtl, jquery
React Native Star Rating
A React Native component for generating and displaying interactive star ratings
Stars: ✭ 724 (-26.5%)
Mutual labels:  star, rating
Awesomstar
Awesome (star)rating system with PHP, MySQL and pure JavaScript.
Stars: ✭ 15 (-98.48%)
Mutual labels:  star, rating
Learningprocess
💥 本仓库用于记录我的学习历程和学习笔记
Stars: ✭ 31 (-96.85%)
Mutual labels:  jquery
Jqtree
Tree widget for jQuery
Stars: ✭ 977 (-0.81%)
Mutual labels:  jquery
Parallax background
jQuery parallax background plugin based on GSAP
Stars: ✭ 30 (-96.95%)
Mutual labels:  jquery
Vent
jQuery inspired DOM events library
Stars: ✭ 30 (-96.95%)
Mutual labels:  jquery
Bootstrap 4 Autocomplete
A simple autocomplete/typeahead for Bootstrap 4 and jQuery
Stars: ✭ 36 (-96.35%)
Mutual labels:  jquery

Krajee Logo
bootstrap-star-rating
Donate

Financial Contributors on Open Collective Bower version Stable Version Unstable Version License Packagist Downloads Monthly Downloads

A simple yet powerful JQuery star rating plugin for Bootstrap which supports advanced features like fractional star fill and RTL input support. Developed with a focus on utlizing pure CSS-3 styling to render the control. The plugin uses Bootstrap markup and styling by default, but it can be overridden with any other CSS markup. View the documentation or a complete demo at Krajee JQuery plugins.

NOTE: Release v4.0 is a modified rewrite with various new enhancements and BC breaking features. It allows rendering richer markup for star symbols and offers theming support.

Star Rating Screenshot

Features

  • Convert any HTML input to a star rating control.
  • The plugin automatically converts an input to a star rating control if you set its class = rating. All options to the input can be passed as HTML5 data attributes.
  • You can use the HTML 5 number input for polyfill and the plugin will automatically use the number attributes like min, max, and step. However, number inputs have a problem with decimal values on the Chrome Browser. Read the Browser Support section in the documentation.
  • Involves pure CSS3 styling of the stars. Say goodbye to image sprites or playing with image backgrounds. Offers clean scalable vector icons for consistent display across devices. Optionally one can use the Unicode character set to override symbols.
  • Use any of your favorite font icon frameworks to render your star symbols (for example you can easily use the icons from the FontAwesome library).
  • Render and display fractional star ratings. Configure number of stars, min, max, step, and theoretically support any fractional rating.
  • Uses Bootstrap 3.x styles & glyphs by default. But this can be overridden with plugin parameters and your own CSS styles.
  • Support for RIGHT TO LEFT (RTL) input. Automatically changes star styling for RTL.
  • Ability to clear values and options for the stars. Control where the clear button element can be shown.
  • Reset star rating to the initial value when the form is reset.
  • Ability to control and display caption of the selected stars. Each rated star can have its own caption. Control where the caption element can be shown.
  • Ability to size the rating control including the stars, caption, and clear button. Five prebuilt size templates are available xl, lg, md, sm, and xs.
  • Triggers JQuery events for advanced development. Events currently available are rating.change, rating.clear, rating.reset, rating.refresh, rating.hover, and rating.hoverleave.
  • Disabled and readonly input star rating support.
  • Change stars and caption on mouse hover (new feature since v3.0.0).
  • Change stars and caption on slide and drag for mobile/touch devices (new feature since v3.1.0).
  • Support for translations and locales.

New features/changes since release v4.0

  • BC Breaking Change: The symbol, glyphicon, ratingClass properties have been removed. The functionality is replaced with the theme property (and can also be complemented or implemented separately using the containerClass property).
  • New property theme will assign a CSS class with the rating-<theme-name> to the rating container.
    • Themes included
      • The default (blank) theme (for displaying bootstrap glyphicons)
      • krajee-svg (for displaying svg icons)
      • krajee-uni (for displaying unicode symbols as stars)
      • krajee-fa (for displaying font awesome icons)
    • Add ability to override and add one's own themes
  • Stars now have a better padding and spacing that can be configured via CSS and themes
  • New property filledStar - will allow one to set the markup for filledStar - will default to
    • <i class="glyphicon glyphicon-star"></i>
  • New property emptyStar - will allow one to set the markup for emptyStar - will default to
    • <i class="glyphicon glyphicon-star-empty"></i>
  • Exclusive support for SVG (and a prebuilt krajee-svg theme that contains two different ready to use SVG icons).
  • Ability to easily set the widget as a "display only" rating via displayOnly property.
  • New property animate to control animation of highlighted stars on hover or click.

NOTE: Refer change log for details on plugin enhancements, fixes, and changes.

Documentation and Demo

View the plugin documentation and plugin demos at Krajee JQuery plugins.

Pre-requisites

  1. Bootstrap 3.x
  2. Latest JQuery
  3. Most browsers supporting CSS3 & JQuery.

Installation

Using Bower

You can use the bower package manager to install. Run:

bower install bootstrap-star-rating

Using Composer

You can use the composer package manager to install. Either run:

$ php composer.phar require kartik-v/bootstrap-star-rating "@dev"

or add:

"kartik-v/bootstrap-star-rating": "@dev"

to your composer.json file

NOTE: You can use the sass branch for installation using bootstrap-sass dependency. The master branch can be used for installation using plain bootstrap dependency.

Manual Install

You can also manually install the plugin easily to your project. Just download the source ZIP or TAR ball and extract the plugin assets (css and js folders) into your project.

Usage

Step 1: Load the following assets in your header.

<!-- default styles -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/css/star-rating.min.css" media="all" rel="stylesheet" type="text/css" />

<!-- optionally if you need to use a theme, then include the theme CSS file as mentioned below -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/themes/krajee-svg/theme.css" media="all" rel="stylesheet" type="text/css" />

<!-- important mandatory libraries -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/js/star-rating.min.js" type="text/javascript"></script>

<!-- optionally if you need to use a theme, then include the theme JS file as mentioned below -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/themes/krajee-svg/theme.js"></script>

<!-- optionally if you need translation for your language then include locale file as mentioned below -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-star-rating/4.0.6/js/locales/<lang>.js"></script>

If you noticed, you need to load the jquery.min.js and bootstrap.min.css in addition to the star-rating.min.css and star-rating.min.js for the plugin to work with default settings.

Step 2: Setup your input markup to automatically initialize the rating

<input id="input-id" type="text" class="rating" data-size="lg" >

Step 3: Initialize the plugin on your page for other input types. For example,

// initialize with defaults
$("#input-id").rating();

// with plugin options (do not attach the CSS class "rating" to your input if using this approach)
$("#input-id").rating({'size':'lg'});

The #input-id is the identifier for the input on your page (that you used to initialize the rating), and this input is hidden automatically by the plugin (by adding the bootstrap CSS class hide).

Alternatively, you can directly call the plugin options by setting data attributes to your input field.

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

bootstrap-star-rating is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].