Star Rating

A star-based rating display component with configurable size and value, perfect for guest reviews and property ratings.

Preview

Sizes

Interactive

Your rating: 0/5

Usage

tsx
import { StarRating } from "zostel-ui";

<StarRating value={4} max={5} size="md" />

Props

value
Type: number
Default: 0

Current rating value

max
Type: number
Default: 5

Maximum number of stars

size
Type: "sm" | "md" | "lg"
Default: "md"

Size of the star icons

color
Type: string
Default: "#F1563F"

Fill color of active stars

readOnly
Type: boolean
Default: true

Whether the rating is read-only