View Source PetalComponents.Rating (petal_components v1.1.5)
Link to this section Summary
Functions
Attributes
rating
(:any
) - The rating to display (integer or float). Defaults to0
.round_to_nearest_half
(:boolean
) - Whether to round the rating to the nearest half star (eg. 3.3 -> 3.5. Defaults totrue
.total
(:integer
) - The total number of stars to display. Defaults to5
.class
(:string
) - Any additional CSS classes for the rating wrapper. Defaults tonil
.star_class
(:string
) - Any additional CSS classes for the individual stars. Eg. you could change the size of the stars with 'h-10 w-10'. Defaults tonil
.include_label
(:boolean
) - Whether to include an automatically generated rating label. Defaults tofalse
.label_class
(:string
) - Any additional CSS classes for the rating label. Defaults tonil
.
Attributes
class
(:string
) - Any additional CSS classes for the star. Defaults tonil
.type
(:atom
) - The type of star to display. Defaults to:empty
.
Link to this section Functions
attributes
Attributes
rating
(:any
) - The rating to display (integer or float). Defaults to0
.round_to_nearest_half
(:boolean
) - Whether to round the rating to the nearest half star (eg. 3.3 -> 3.5. Defaults totrue
.total
(:integer
) - The total number of stars to display. Defaults to5
.class
(:string
) - Any additional CSS classes for the rating wrapper. Defaults tonil
.star_class
(:string
) - Any additional CSS classes for the individual stars. Eg. you could change the size of the stars with 'h-10 w-10'. Defaults tonil
.include_label
(:boolean
) - Whether to include an automatically generated rating label. Defaults tofalse
.label_class
(:string
) - Any additional CSS classes for the rating label. Defaults tonil
.
attributes
Attributes
class
(:string
) - Any additional CSS classes for the star. Defaults tonil
.type
(:atom
) - The type of star to display. Defaults to:empty
.