v5.0.0RatingBadgeRatingSummaryRatingWallRatingPromptAnalyticsGlow ✨SkeletonUndo
v5 — The Complete Update
10 components · 5 hooks · zero dependencies
44.8(1.2k)3
01
RatingBadge
New in v54 sizes — xs sm md lg
4.8(1.2k)4.3(521)3.94.1(88)
import { RatingBadge } from "star-rating-x";
<RatingBadge value={4.8} count={1247} theme="gold" size="lg"/>
<RatingBadge value={4.3} count={521} theme="ocean" size="md"/>
<RatingBadge value={3.9} theme="fire" size="sm" compact/>
<RatingBadge value={4.1} count={88} theme="violet" size="xs"/>02
RatingSummary
New in v5Amazon-style full review summary
4.3
1.3k reviews
4.5
1,317 ratings
5
842
4
321
3
98
2
34
1
22
A
Ahmed M.✓May 2025
Absolutely love it!
Best product this year. Quality exceeded expectations.
S
Sara K.✓Apr 2025
Great value
Really happy. Minor packaging issue but product itself is excellent.
import { RatingSummary } from "star-rating-x";
<RatingSummary
average={4.3}
total={1317}
distribution={{ 5:842, 4:321, 3:98, 2:34, 1:22 }}
reviews={recentReviews}
showReviews
onWriteReview={() => openModal()}
theme="gold"
/>03
RatingWall
New in v5Masonry grid with load-more
A5
Ahmed M.✓
May 2025
Absolutely love it!
Best product this year. Quality exceeded expectations.
S4
Sara K.✓
Apr 2025
Great value
Really happy. Minor packaging issue but product itself is excellent.
O5
Omar R.
Apr 2025
Highly recommend
Fast shipping, exactly as described. Will order again.
L3
Lena T.✓
Mar 2025
Good but not perfect
Decent product. Expected a bit more from the premium tier.
import { RatingWall } from "star-rating-x";
<RatingWall
reviews={reviews}
columns={2}
maxItems={4}
showMore
theme="gold"
onHelpful={(r) => markHelpful(r.id)}
/>04
useRatingAnalytics
New in v5NPS · trend · distribution · stdDev
Average4.23/5
Median4.5
Mode5⭐
NPS43
Trend➡️ stable
Positive80%
import { useRatingAnalytics } from "star-rating-x";
const stats = useRatingAnalytics(ratingsArray);
// stats.average → 4.27
// stats.nps → 73
// stats.trend → "improving"
// stats.percentPositive → 77%05
glowEffect ✨
New in v5Drop-shadow glow around filled stars
<StarRating
glowEffect
glowIntensity={0.6}
value={rating}
onChange={setRating}
theme="gold"
size={34}
/>06
Skeleton Loading
New in v5Shimmer placeholder while data loads
4
<StarRating loading count={5} size={30} />
// Toggle based on data state:
<StarRating loading={isLoading} value={rating} />07
allowUndo
New in v5Undo toast after each rating change
3
Change your rating — undo toast appears
<StarRating
value={rating}
onChange={setRating}
allowUndo
undoTimeout={4000}
onUndo={(prev) => console.log("Reverted to", prev)}
/>08
onRatingComplete + debounce
New in v5Fires after user stops changing
0
Select a rating — fires 600ms after you stop
<StarRating
onRatingComplete={(v) => submitToAPI(v)}
debounceMs={600}
theme="rose"
/>09
RatingPrompt
New in v5Smart popup — time · scroll · manual
Supports: time · scroll · manual
import { RatingPrompt } from "star-rating-x";
// Trigger after 5 seconds
<RatingPrompt
trigger="time"
delay={5000}
message="Enjoying the app?"
onRate={(v) => submitRating(v)}
onDismiss={() => setShow(false)}
placement="bottom-right"
theme="gold"
/>