You can install it in the same way you would install main components. You can copy the shadcn cli command or copy the component directly.
If you choose to install it via shadcn cli command, you'll have to choose desired package manager.
Name | Description | Type |
---|---|---|
color | Star color | string |
size | Width and height of star in pixels | number |
stroke | Path stroke color | string |
strokeWidth | Stroke width | number |
pathClassName | Path classname | string |
If color prop isn't present fallback value will be currentColor
.
Rest of the props are extended from <React.SVGProps>
(basically all attributes an svg can have, such as className, width, height, aria attributes etc.).
<Star1 color="red" size={200} />
<Star1 color="red" size={200} stroke="black" strokeWidth={2} />
<Star1 color="red" width={180} height={210} stroke="black" strokeWidth={2} />
<Star1 className="text-red-500 dark:text-blue-500" size={200} stroke="black" strokeWidth={2} />
<Star1 className="text-red-500 dark:text-blue-500" pathClassName="stroke-black dark:stroke-white" size={200} strokeWidth={2} />
xd