v4.0.0Gradient FillCompare ModeConfetti ๐overallLabel
v4 โ Visual Upgrade
Gradient fill ยท Compare mode ยท Confetti ยท overallLabel ยท dividerColor
43avg 4.25
01
filledGradient
v4Preset gradient themes
3
<StarRating
filledGradient={["#FBBF24","#F97316","#EF4444"]}
gradientDirection="horizontal"
value={rating}
onChange={setRating}
/>v4gradientDirection
3
// "horizontal" | "vertical" | "diagonal"
<StarRating
filledGradient={["#38BDF8","#6366F1"]}
gradientDirection="diagonal"
/>02
compareValue โ Ghost Rating
v4Your rating vs community average
2avg 4.2
Ghost stars show 4.2 avg behind your rating
<StarRating
value={myRating}
onChange={setMyRating}
compareValue={4.2}
compareLabel="community avg"
theme="ocean"
showValue
/>03
celebrateOnMax ๐
v4Confetti burst on 5 stars
3
Click the 5th star! ๐
<StarRating
celebrateOnMax
confettiColors={["#FBBF24","#F97316","#EC4899","#8B5CF6"]}
value={rating}
onChange={setRating}
animation="pop"
/>04
RatingGroup โ overallLabel & dividerColor
v4Customise the average row
Quality4
Service3
Value5
Overall4.0
<RatingGroup
categories={categories}
overallLabel="ุฅุฌู
ุงูู" // any language
dividerColor="#7c3aed"
averageLabelStyle={{ color:"#a78bfa", fontStyle:"italic" }}
showAverage
showValues
/>