Rate

A star rating component for collecting user feedback.

When to Use

  • For product or service reviews
  • To collect user satisfaction scores
  • For any 1-5 scale rating input

Import

import { Rate } from "orizon";

Examples

Basic

<Rate defaultValue={3} />

Half Stars

<Rate allowHalf defaultValue={2.5} />

Read Only

<Rate disabled defaultValue={4} />

With Tooltips

<Rate
  tooltips={["Terrible", "Bad", "Normal", "Good", "Excellent"]}
  defaultValue={3}
/>

Custom Count

<Rate count={10} defaultValue={6} />

API

RateProps

  • valuenumber — Current rating (controlled)
  • defaultValuenumber — Default rating (default: 0)
  • countnumber — Total number of stars (default: 5)
  • allowHalfboolean — Allow half-star selections (default: false)
  • allowClearboolean — Allow clearing by clicking again (default: true)
  • characterReactNode | (info) => ReactNode — Custom star character
  • disabledboolean — Read-only mode (default: false)
  • tooltipsstring[] — Tooltip text for each star
  • onChange(value: number) => void — Rating change callback
  • onHoverChange(value: number) => void — Hover value callback