<1 min read
BaseRating
BaseRating
Rating component. This component renders a set of elements filled based on the value passed as prop.
Props
Name | Description | Type | Default |
---|---|---|---|
value | Numeric value used to calculates the width of the filled elements. | number |
|
max | Maximum number of elements to paint. | number | 5 |
Slots
Name | Description | Bindings (name - type - description) |
---|---|---|
empty-icon | The content to render as empty icon | None |
filled-icon | The content to render as filled icon | None |
Examples
This component receives a value
as prop and renders a set of elements, which will be filled based
on this value.
Basic usage
<BaseRating :value="5.23" />
Customizing its contents
<BaseRating :value="7.15" :max="10">
<template #filled-icon>
<TestIcon/>
</template>
<template #empty-icon>
<TestIcon/>
</template>
</BaseRating>