Rushil Dhinoja

Star Rating

Forms 7

About

An interactive star rating component with configurable scale, sizes (sm/md/lg), and readonly mode. Users can click stars to set ratings with smooth hover animations and visual feedback.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Star Rating to your project and fits it to your theme.

Code

How Star Rating is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React from 'react'
import { StarRating } from "@/components/ui/star-rating";

export default function DemoOne() {

  const [rating, setRating] = React.useState(3)

  return <StarRating ratingScale={5} value={rating} onRatingChange={(rating) => setRating(rating)} />;
}

Dependencies

More by Rushil Dhinoja

View all
  • Morphing Square

    Morphing Square

    437
  • Voice Input

    Voice Input

    314
  • Warp Dialog

    Warp Dialog

    268
  • Orbital Loader

    Orbital Loader

    210
  • Bouncing Dots

    Bouncing Dots

    195
  • Vignette Grid Background

    Vignette Grid Background

    190
  • Wave Loader

    Wave Loader

    133
  • Discussion

    Discussion

    85

More in Forms

View all
  • Premium Auth

    Premium Auth

    524
  • Contact Card

    Contact Card

    1K
  • Book A Demo 1

    Book A Demo 1

    73
  • Login 1

    Login 1

    53
  • Form

    Form

    137
  • Card Studio

    Card Studio

    41
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • SignInPage

    SignInPage

    667