alwkala

Rating

Component

About

An interactive or read-only star rating control for displaying and collecting feedback scores, with an optional numeric label.

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

Code

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

Usage.tsx

"use client";

import RatingComponent from "@/components/ui/rating";
import { useState } from "react";

export default function RatingDemo() {
  const [value, setValue] = useState(3);

  return (
    <div className="flex flex-col items-center justify-center gap-4 p-10">
      <RatingComponent
        value={value}
        isReadonly={false}
        showLabel
        onChange={setValue}
      />
    </div>
  );
}

More by alwkala

View all
  • Callout

    Callout

    10
  • Progress Bar

    Progress Bar

    3
  • Breadcrumb

    Breadcrumb

    1
  • Navbar

    Navbar

    1
  • Kbd

    Kbd

  • Pagination

    Pagination

  • Back To Top

    Back To Top

  • Checkbox

    Checkbox