rating-input

Rating Input

Lets the user give a rating by picking a mark, drawn with the Rating item's stars or dots, joining a Field.

States: Default, Focus, Disabled

Parts

PartFileDoes
RatingInputRatingInput.vueLets the user give a rating by picking one of its marks, drawn as dots or stars.

Styling

PartRecipe
RatingInputrating-input
RatingInputrating-input-item

Install

Writes 3 files into components/ui/rating-input/. For agents, npx @frontic/ui docs rating-input prints this reference as markdown; the MCP server serves the same.

Installs with it
rating
use-field-control
npm packages
@vueuse/core
class-variance-authority
reka-ui

Built from

API reference

RatingInput RatingInput.vue

Lets the user give a rating by picking one of its marks, drawn as dots or stars.

PropTypeDefault
lengthnumber5
disabledbooleanfalse
dirDirection—
orientationDataOrientation'horizontal'
asChildbooleanfalse
asAsTag | Component—
modelValuenumber—
defaultValuenumber—
namestring—
requiredbooleanfalse
loopbooleanfalse
clearablebooleanfalse
hoverablebooleantrue
classClassValue—
sizeRatingSize'md'
shapeRatingShape'star'
label((value: number, length: number) => string)`${value} out of ${length}`
EventPayload
update:modelValuepayload: number
Data attributeValues
data-disabled—
Recipe rating-inputSets
base: rating-input 3 properties
Recipe rating-input-itemSets
base: rating-input-item 1 property
shape: dot 1 property
shape: stardefault 1 property
focus-ringshared state 3 properties
disabledshared state 1 property
Example
State