Skip to content
DocsSupportPricing
Roadmap (has updates coming soon)XFigma3.8K
Sign inGet All-Access
Overview
  • Introduction
  • Get Started
  • License Setup
  • Styling
  • Registry
  • MCP Server
  • Embed
  • Agent Skills
  • llms.txt
  • RTL
  • Changelogv2.8.2
  • YouTube
MCP Server
  • Claude
  • CodexCodexCodex
  • Cursor
  • Grok
  • Conductor
  • v0
  • Lovable
  • Replit
  • Bolt
  • OpenCode
  • VS Code
  • GitHub Copilot
  • Kilo Code
  • Zed
  • Antigravity
  • Gemini CLI
Components
  • Alert
  • Autocomplete
  • Badge
  • Cascader
  • Code Block
  • Color Picker
  • Data Grid
  • Date Selector
  • Emoji Picker
  • Event Calendar
  • File Type
  • File Upload
  • Filters
  • Frame
  • Gantt
  • Icon Stack
  • Icon Tile
  • Kanban
  • Number Field
  • Phone Input
  • Rating
  • Scrollspy
  • Signature Pad
  • Sortable
  • Stepper
  • Time Picker
  • Timeline
  • Tree

Application

  • App ShellAdded an observability console app shell
  • Auth
  • Card
  • Dashboard
  • DialogAdded a duplicate contact check dialog
  • Empty State
  • Event Calendar
  • Flow
  • Form
  • Gantt
  • Kanban Board
  • List
  • Navbar
  • Onboarding
  • Profile
  • Rich Text Editor
  • Schedule
  • Settings
  • Sheet
  • Stats
  • Timeline
  • Whiteboard
  • Wizard

Data Grid

  • BaseAdded an API request logs grid, and 2 grids were rebuilt
  • AdvancedAdded 12 new Data Grid Advanced blocks, 17 in all
  • Columns
  • Drag & Drop
  • Editing
  • Expansion
  • Filtering
  • Grouping
  • Virtualization

Charts

  • Area Chart
  • Bar Chart
  • Composed ChartChart 36 is now an operating margin chart
  • Line Chart
  • Pie ChartAdded a cloud spend budget rose
  • Radial Chart
  • Sankey Chart
  • Slope Chart
  • Sparkline
  • Status Tracker

AI & Agents

  • AI Chat
  • Agent Activity
  • AI UsageAdded 2 new AI Usage blocks, 4 in all

Solutions

  • Dev Ops
  • AI Ops
  • CRM
  • Agents
  • Analytics
  • BillingAdded a tenant billing settings block
  • BookingsAdded a hotel room board, and the salon front desk was rebuilt
  • Files
  • Inventory
  • MapNew Map category with a fleet dispatch map
  • TravelNew Travel category with 2 blocks for event travel operators
  • UsersAdded a team access settings block
  • Digital Twin

Templates

  • E-commerce
  • SaaS
  • Dashboard
  • Landing
  • All templates

eCommerce

  • Category Card
  • Checkout
  • Comparison
  • Coupon
  • Filter Sidebar
  • Product Card
  • Product Detail
  • Product Grid
  • Receipt
  • Review
  • Shopping Cart
  • Wishlist
  • Shop Hero

Marketing

  • Blog
  • Compare
  • Contact
  • CTA
  • FAQ
  • Hero
  • How It Works
  • Pricing

Resources

  • Components
  • Blocks
  • Icons
  • MCP for Agents
  • Docs
  • Support
  • Pricing
  • Tailwind Plus Alternative
  • Roadmap(has updates coming soon)
  • AffiliateSoon

Legal

  • Privacy Policy
  • Terms & Conditions
  • License
  • Refunds
  • Cookies

© 2026 ReUI. All rights reserved.

3.8K

Shadcn Rating

PreviousNext

Custom Shadcn Rating for React and Tailwind CSS. A customizable star rating component that supports read-only display and interactive input modes.

Base UIRadix UI

Installation

pnpm dlx shadcn@latest add @reui/rating

Usage

import { Rating } from "@/components/reui/rating"
<Rating rating={

Shadcn Rating Free Components

Browse 9 production-ready Shadcn Rating components for dashboards, forms, and product UI. These examples use Base UI primitives from @base-ui/react and stay fully compatible with Shadcn Create so radius, color, and typography match your configured theme.

Browse all 9 Shadcn Rating components for copy-ready layouts, dashboards, and forms built with Tailwind CSS in the ReUI library.

Phone InputScrollspy

On This Page

InstallationUsageFor AI AgentsExamplesDecimalShow ValueEditableSizeAPI ReferenceRating
4.5
}
showValue
editable
/>

For AI Agents

Hand your agent this brief or the ReUI MCP, not a screenshot. Free to install.

When to use

  • Read only star scores at 3 sizes, with partial stars for averages such as 3.5 or 4.6
  • Star inputs that collect a whole star score in feedback and written review forms
  • Review summaries with a count bar per star level, and 5 step emoji scales for quick feedback

When not to use

  • A full product page section of buyer quotes, avatars and a ratings overview: use the Review blocks
  • A required score that keyboard and screen reader users must be able to set: use the Radio Group component
  • A score picked in half or finer steps rather than whole stars: use the Slider component

Agent notes

  • An editable Rating takes pointer clicks only: each star is a div with an onClick and no role, tab stop or key handler
  • Clicks send whole numbers from 1 to maxRating to onRatingChange; a decimal rating draws a partial star but cannot be picked
  • starClassName styles the showValue number, not the stars; recolor stars from className through the rating-star-filled slot
Markdownhttps://reui.io/docs/components/base/rating.md
MCPget_component("rating")
Installnpx shadcn@latest add @reui/rating
Full index for agents:llms.txtReUI MCP setup

Examples

Decimal

import { Rating } from "@/components/reui/rating"

export function Pattern() {
  return <Rating rating={3.5} />
}

Show Value

import { Rating } from "@/components/reui/rating"

export function Pattern() {
  return <Rating rating={4.5} showValue={true} />
}

Editable

"use client"

import { useState } from "react"
import { Rating } from "@/components/reui/rating"
import { toast } from "sonner"

export function Pattern() {
  const [productRating, setProductRating] = useState(0)

  const handleRatingChange = (rating: number) => {
    setProductRating(rating)

    toast.success("Rated {rating} out of 5", {
      description: `Rated ${rating} out of 5`,
    })
  }

  return (
    <div className="space-y-8">
      <Rating
        rating={productRating}
        editable={true}
        onRatingChange={handleRatingChange}
        showValue={true}
      />
    </div>
  )
}

Size

import { Rating } from "@/components/reui/rating"

export function Pattern() {
  return (
    <div className="flex flex-col items-center gap-4">
      <Rating rating={4} size="sm" />
      <Rating rating={4} />
      <Rating rating={4} size="lg" />
    </div>
  )
}

API Reference

Rating

The main component for displaying and editing star ratings.

PropTypeDefaultDescription
ratingnumber-Required. The current rating value. Supports decimal values for partial stars.
maxRatingnumber5Total number of stars to display.
size"sm" | "default" | "lg""md"The size of the stars and spacing.
showValuebooleanfalseWhether to show the numeric rating value next to the stars.
editablebooleanfalseWhether the rating can be changed by clicking on stars.
onRatingChange(rating: number) => void-Callback fired when a star is clicked (if editable is true).
starClassNamestring-Additional CSS classes for the numeric value container.
classNamestring-Additional CSS classes for the root container.
import { Rating } from "@/components/reui/rating"

export function Pattern() {
  return <Rating rating={4} />
}