The Heroicons star icon depicts a five-pointed star, commonly used to represent ratings, favorites, or important items.
Common uses
- User rating system (e.g., 4 out of 5 stars)
- Marking a product or item as a favorite
- Highlighting a featured or important element
Use it in React
Install
npm i @heroicons/reactImport & render
import { StarIcon } from '@heroicons/react/24/outline';
<StarIcon className="size-6" />Styles
Heroicons ships this icon in 4 styles — each its own import:
24/outline
<StarIcon className="size-6" />24/solid
<StarIcon className="size-6" />20/solid
<StarIcon className="size-6" />16/solid
<StarIcon className="size-6" />Details
- Library
- Heroicons (324 icons)
- License
- MIT
- viewBox
0 0 24 24- Keywords
- starratingfavoritestar outlinehighlight
FAQ
- What is the star icon used for?
- It's typically used for indicating ratings, favorites, or highlighting important content.
- How do I use the star icon in React?
- Import it using `import { StarIcon } from '@heroicons/react/24/outline'` and then use it as a React component.
- What is the license for Heroicons?
- Heroicons are released under the MIT license, allowing for free use.
Related icons
The same idea in other libraries, and near matches in Heroicons.