Use our Tailwind CSS Rating component to show reviews and ratings in your web projects. The Rating can be used as a visual identifier for reviews and rating on your website.
See below our beautiful Rating examples that you can use in your Tailwind CSS and React project. The example also comes in different styles and colors so you can adapt it easily to your needs.
We provide different colors for Rating component like primary, secondary, info, success, warning, and error so you can adapt it easily to your needs. You can simply use the color prop to change the Rating component color.
In the example below, we've showcased the different colors for Rating color that you can use in your project.
"use client";
import { Rating } from "@material-tailwind/react";
export function RatingColors() {
return (
<div className="flex flex-col gap-4">
<Rating value={4} color="primary" />
<Rating value={4} color="secondary" />
<Rating value={4} color="info" />
<Rating value={4} color="success" />
<Rating value={4} color="warning" />
<Rating value={4} color="error" />
</div>
);
}
"use client";
import { Rating } from "@material-tailwind/react";
You can use the readonly prop to make the Rating component readonly, it's useful for just showing rating and prevent the user from interacting with the Rating component.
"use client";
import { Rating } from "@material-tailwind/react";
export function ReadonlyRating() {
return <Rating value={4} readonly />;
}
"use client";
import { Rating } from "@material-tailwind/react";
You can use the ratedIcon and unratedIcon props for customizing the icons for rated and unrated states of Rating component. In the example below, we've showcased custom icons used for Rating component that you can use in your project.
"use client";
import { Rating } from "@material-tailwind/react";
import { Heart, HeartSolid } from "iconoir-react";
The Rating component can be used with a label to provide more context to the user. In the example below, we've added a label by using the Rating and Typography components together.
4
Based on 134 Reviews
"use client";
import * as React from "react";
import { Rating, Typography } from "@material-tailwind/react";
Use the example below for providing testimonials and feedbacks in your website, the example used Typography, Avatar and Rating components to make a user feedback component.
"This is an excellent product, the documentation is excellent and helped me get things done more efficiently."
Tania Andrew
Lead Frontend Developer
"use client";
import { Typography, Avatar, Rating } from "@material-tailwind/react";
export function RatingWithComment() {
return (
<div className="px-8 text-center">
<Typography as="p" type="h5" className="mb-6">
"This is an excellent product, the documentation is excellent and