l2t-paper-rating

WebJar for l2t-paper-rating

License

License

MIT
GroupId

GroupId

org.webjars.bowergithub.link2twenty
ArtifactId

ArtifactId

l2t-paper-rating
Last Version

Last Version

2.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

l2t-paper-rating
WebJar for l2t-paper-rating
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Link2Twenty/l2t-paper-rating

Download l2t-paper-rating

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.link2twenty/l2t-paper-rating/ -->
<dependency>
    <groupId>org.webjars.bowergithub.link2twenty</groupId>
    <artifactId>l2t-paper-rating</artifactId>
    <version>2.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.link2twenty/l2t-paper-rating/
implementation 'org.webjars.bowergithub.link2twenty:l2t-paper-rating:2.0.4'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.link2twenty/l2t-paper-rating/
implementation ("org.webjars.bowergithub.link2twenty:l2t-paper-rating:2.0.4")
'org.webjars.bowergithub.link2twenty:l2t-paper-rating:jar:2.0.4'
<dependency org="org.webjars.bowergithub.link2twenty" name="l2t-paper-rating" rev="2.0.4">
  <artifact name="l2t-paper-rating" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.link2twenty', module='l2t-paper-rating', version='2.0.4')
)
libraryDependencies += "org.webjars.bowergithub.link2twenty" % "l2t-paper-rating" % "2.0.4"
[org.webjars.bowergithub.link2twenty/l2t-paper-rating "2.0.4"]

Dependencies

compile (4)

Group / Artifact Type Version
org.webjars.bowergithub.polymer : polymer jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : paper-icon-button jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : iron-a11y-keys-behavior jar [2.0.0,3)
org.webjars.bowergithub.polymerelements : iron-icons jar [2.0.0,3)

Project Modules

There are no modules declared in this project.

Published on webcomponents.org Published on Vaadin  Directory Stars on vaadin.com/directory

<l2t-paper-rating>

A polymer element to display "star" ratings in a paper style

Install with bower

First you need bower, see their site for details

bower install --save l2t-paper-rating

Examples

  <l2t-paper-rating></l2t-paper-rating> <br/>
  <l2t-paper-rating rating="2" readonly></l2t-paper-rating> <br/>
  <l2t-paper-rating rating="3" total="4"></l2t-paper-rating>

A11y/ARIA

For screen readers it's helpful to have a label though the traditional label element will not work with custom elements so we'll need to change the aria-label or aria-labelledby properties directly.

There are examples of both methods on the demo page.

Styling

The following custom properties are available for styling:

Custom property Description Default
--rating-icon-color The color of the icons --primary-text-color
--rating-icon-size The size of the icon (square) 28px
--rating-icon-padding The size of the padding between icons 2px
--rating-ink-color The color of the ripple on icon tap --primary-text-color
--rating-unselected-opacity The opacity of stars 'non-active' 0.4

Properties

Public

Attribute Name Functionality Type Default
icon the icon to use (iron-icons) String star
rating numbers of star selected (reflectToAttribute) Number 1
readonly can the rate be modified Boolean false
total maximum number of stars selectable Number 5

Versions

Version
2.0.4
2.0.2