The Rating component for Retool Apps
An input field to select a rating.
Settings
Rating includes the following configurable options when building apps in the IDE.
Properties
All properties for Rating with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
customValidation
The custom validation message to display if the invalid
is true
.
Properties
event
The event type.
Values
change | A user changes the value. |
click | A user clicks or taps the component. |
submit | A user submits the value. |
focus | A user selects the input field. |
blur | A user deselects the input field. |
scan | A user scans a barcode. |
open | A user opens the component. |
close | A user closes the component. |
true | A user sets the value to |
false | A user sets the value to |
select | A user selects a value. |
clear | A user clears the value. |
upload | A user uploads a file. |
parse | An uploaded file is parsed. |
inputValueChange | A user changes the value of the input field. |
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
formDataKey
The key used by a Form component to assign default values to input fields using form.initialData
, and to construct the form.data
property.
Whether to hide the validation message if the invalid
is true
.
icons
The icons to display.
Values
You can select an icon or dynamically set one with a valid icon key.
stars | ⭐ icons. |
hearts | ❤️ icons. |
faces | 😀 icons. |
id
The unique identifier.
invalid
Whether the value has failed any validation rules.
isHiddenOnDesktop
Whether the component is visible in the desktop layout.