Class BOBRating
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
[GenerateComponentInfo]
public class BOBRating : BOBComponentBase, IHasSize, IHasColor, IHasReadOnly, IHasDisabled
- Inheritance
-
objectComponentBaseBOBRating
- Implements
- Inherited Members
Constructors
BOBRating()
public BOBRating()
Properties
AllowHalf
When true, allow half-step values (0.5 increments).
[Parameter]
public bool AllowHalf { get; set; }
Property Value
- bool
AriaLabel
Aria-label fallback when Label is empty.
[Parameter]
public string? AriaLabel { get; set; }
Property Value
- string
Color
Foreground color applied to filled stars.
[Parameter]
public string? Color { get; set; }
Property Value
- string
Disabled
When true, the rating is disabled (no interaction, dimmed).
[Parameter]
public bool Disabled { get; set; }
Property Value
- bool
EmptyIcon
Icon rendered for the "empty" state. Defaults to i_star_border.
[Parameter]
public IconKey EmptyIcon { get; set; }
Property Value
FullIcon
Icon rendered for the "filled" state. Defaults to i_star.
[Parameter]
public IconKey FullIcon { get; set; }
Property Value
HalfIcon
Icon rendered for the "half-filled" state. Defaults to i_star_half.
[Parameter]
public IconKey HalfIcon { get; set; }
Property Value
HelperText
Helper text rendered below the row.
[Parameter]
public string? HelperText { get; set; }
Property Value
- string
IsDisabled
Computed disabled state, combining Disabled with internal conditions such as loading.
public bool IsDisabled { get; }
Property Value
- bool
IsReadOnly
Computed read-only state.
public bool IsReadOnly { get; }
Property Value
- bool
Label
Optional label rendered above the row.
[Parameter]
public string? Label { get; set; }
Property Value
- string
MaxValue
Maximum value (number of stars). Range 1-10. Defaults to 5.
[Parameter]
public int MaxValue { get; set; }
Property Value
- int
ReadOnly
When true, the rating is read-only (still announced to assistive tech).
[Parameter]
public bool ReadOnly { get; set; }
Property Value
- bool
Size
Visual size of each star.
[Parameter]
public BOBSize Size { get; set; }
Property Value
Value
Current rating value. 0 means unrated.
[Parameter]
public double Value { get; set; }
Property Value
- double
ValueChanged
Raised when the user picks a value (click or keyboard).
[Parameter]
public EventCallback<double> ValueChanged { get; set; }
Property Value
- EventCallback<double>
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()