Home

raty

Raty is a lightweight, open-source JavaScript library that provides a star-rating user interface for web pages. Implemented as a jQuery plugin, raty enables developers to display a set of stars that users can click or hover to select a rating. It supports customization of the number of stars, the initial rating, hints for each star, and a read-only mode for display-only ratings. It can synchronize with form inputs or hidden fields, updating their values as the user interacts.

Key features include: configurable number of stars (default five), initial score, optional cancel button, hints per

Raty typically uses image assets for star icons or CSS backgrounds and can be themed with custom

Origin and usage: raty has been adopted across many web projects to add interactive rating features without

See also: rating widgets, jQuery plugins, star rating libraries.

star,
and
callbacks
for
rating
events.
The
API
is
designed
to
be
straightforward:
you
initialize
on
a
jQuery
element
and
pass
an
options
object.
For
example:
$(selector).raty({
score:
3,
number:
5,
hints:
['bad','poor','regular','good','excellent'],
click:
function(score,
evt)
{
/*
handle
rating
*/
}
});
icons
or
fonts.
It
integrates
with
forms
by
providing
a
target
input
or
hidden
field
to
store
the
numeric
rating
value,
making
it
easy
to
submit
with
standard
form
data.
building
a
custom
UI
from
scratch.
As
a
self-contained
plugin,
it
relies
on
jQuery
and
optional
assets
for
visuals.
Licensing
and
maintenance
vary
by
distribution,
and
multiple
forks
and
variants
exist
on
code
hosting
platforms.