StarRating¶
StarRating shows a score as stars. The user can change the score, or you can make it read-only.
Usage¶
Call Components.StarRating with a scope and a table of properties:
Properties¶
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Theme |
ThemeRef |
The contextual theme | Theme to use for this component instead of the one from Theme.Provide. |
|
LayoutOrder |
UsedAs<number> |
0 |
Position in a parent UIListLayout or UIGridLayout. |
|
Size |
UsedAs<UDim2> |
- | Size of the component. | |
Visible |
UsedAs<boolean> |
true |
Whether the component is shown. | |
ZIndex |
UsedAs<number> |
- | Z index of the component. | |
Value |
UsedAs<number> |
0 |
The value. A plain value is only the starting value. A Value stays in step with the control: the user's changes set it, and setting it changes the control. |
|
Max |
number |
5 |
Number of stars. | |
ReadOnly |
boolean |
false |
Show the score only. The stars do not react to input. | |
IconSize |
number |
24 |
Size of one star, in pixels. | |
Id |
string |
- | Key that identifies this component when state is kept across rebuilds. See Persist. |
Callbacks¶
| Name | Description |
|---|---|
OnChanged: (number) -> () |
Runs with the number of stars the user chose. |