Star Rating is a free React star rating input for Next.js and Tailwind CSS with half stars, hover preview, drag to rate on touch screens, full keyboard control, a hidden form input and a read only mode for any fraction, drawn either as faceted cut stars lit by a light that follows the pointer or as classic rounded stars, in gold, silver, chili, rose and violet.
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
Free Wensity component. Installs to @components/wensity/star-rating.tsx. For Pro components and updates, use pnpm dlx wensity@latest add star-rating.