DDBS UI
commerce

Store Stars

Five-star rating display with filled and empty colours from --store-star-on and --store-star-off.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/store-stars.json
Dependencies:lucide-react
Fullscreen

Usage

store-stars-example.tsx
import { Stars } from "@dbs/ui";
import { StoreScope } from "./_store";

export default function StoreStarsExample() {
  return (
    <div className="grid w-full max-w-md gap-4 sm:grid-cols-2">
      <StoreScope minHeight={0}>
        <div className="flex flex-col gap-2">
          <Stars rating={5} />
          <Stars rating={4.4} />
          <Stars rating={3} className="h-6 w-6" />
        </div>
      </StoreScope>
      <StoreScope dark minHeight={0}>
        <div className="flex flex-col gap-2">
          <Stars rating={5} />
          <Stars rating={4.4} />
          <Stars rating={3} className="h-6 w-6" />
        </div>
      </StoreScope>
    </div>
  );
}