Rating
Last updated
Was this helpful?
Last updated
Was this helpful?
Customizable Scale: Define the number of rating units (e.g., stars) to suit your application's needs.
Half-Star Support: Enable half-star increments for more precise ratings.
Read-Only Mode: Display ratings without allowing user interaction, useful for showcasing average ratings.
Dynamic Binding: Bind the rating value to data sources or variables for real-time updates.
Event Handling: Trigger actions based on user interactions, such as submitting a rating or displaying a message.
Maximum Rating: Set the total number of rating units (e.g., 5 stars).
Allow Half Ratings: Enable or disable half-star selections.
Default Value: Specify the initial rating value displayed.
Read-Only: Determine whether the rating is interactive or display-only.
Styling: Customize the appearance, including size, color, and spacing, to match your application's design.
Data Binding: Use Lowcoder's data binding syntax ({{ }}
) to connect the rating value to variables or data sources.
Event Handling: Implement event handlers to perform actions when the rating changes, such as updating a database or triggering a notification.
Combining with Other Components: Integrate the Rating component with forms or feedback sections to collect comprehensive user input.
On Component Playground, you can interact with the Rating component and explore it's Properties, Events and Methods. Play with different Styling properties to see the effect on the Rating component.
In the Auto-Docs of Rating component, we have shown how to use different properties of the Rating component. It also includes the Styling properties of the Rating component.
These properties are accessible in {{ }} notations, as well as in JavaScript Queries.
value
String
Returns the current value of the Rating component
disabled
Boolean
Returns True or False based on whether the Rating component is disabled or not
hidden
Boolean
Returns True or False based on whether the Rating component is hidden or not
max
Number
Returns the maximum value of the Rating component
Events give you the ability to trigger further actions (with Event-Handlers).
Change
Triggers, when anything changes on the Rating component
You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.
setValue() :
rating1.setValue() method sets the Rating component's Value property, which gets shown in the Rating component.
clearValue() :
rating1.clearValue() clears the Rating component's Value property and empties the value from the Rating component.
resetValue() :
select1.resetValue() method resets the Rating component's value property to the default value of the Rating component.
setDefaultValue() :
select1.setDefaultValue() method sets the Rating component's Default value, which gets shown in the Rating component as default.
clearDefaultValue() :
select1.clearDefaultValue() clears the Rating component's Default value and empties the value from the Rating component.
resetDefaultValue() :
select1.resetDefaultValue() method resets the Rating component's Default value to the default value of the Rating component.
Product Reviews: Allow customers to rate products they've purchased.
Service Feedback: Collect user ratings on services provided.
Content Evaluation: Enable users to rate articles, videos, or other content.
Performance Assessments: Gather evaluations for employees, students, or systems.