# `PetalComponents.Rating`
[🔗](https://github.com/petalframework/petal_components/blob/v3.2.0/lib/petal_components/rating.ex#L1)

# `rating`

## Attributes

* `rating` (`:any`) - The rating to display (integer or float). Defaults to `0`.
* `round_to_nearest_half` (`:boolean`) - Whether to round the rating to the nearest half star (eg. 3.3 -> 3.5. Defaults to `true`.
* `total` (`:integer`) - The total number of stars to display. Defaults to `5`.
* `class` (`:any`) - Any additional CSS classes for the rating wrapper. Defaults to `nil`.
* `star_class` (`:any`) - Any additional CSS classes for the individual stars. Eg. you could change the size of the stars with 'h-10 w-10'. Defaults to `nil`.
* `include_label` (`:boolean`) - Whether to include an automatically generated rating label. Defaults to `false`.
* `label_class` (`:any`) - Any additional CSS classes for the rating label. Defaults to `nil`.

# `rating_star`

## Attributes

* `class` (`:any`) - Any additional CSS classes for the star. Defaults to `nil`.
* `type` (`:atom`) - The type of star to display. Defaults to `:empty`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
