RayCraftDocs
v1.0.3 raycraft.dev
On this page

PercentField

Free

Number field that the user types as a percentage (12.5) while the value is stored as a fraction (0.125). Min and Max are in percent (0 to 100 by default); Decimals sets how many digits are kept.

Example

PercentField control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DecimalsintDigits kept after the decimal point of the percentage (default 2).
DisabledboolDisables interaction.
DisplayNamestringName used in validation messages.
HelperTextstringHint shown below the field.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
MaxDoubleLargest allowed value (ProgressBar: the value that means 100%; Rating: number of stars).
MinDoubleSmallest allowed value.
ReadOnlyboolShows the value but does not allow changes.
StepDoubleAmount added or removed by the buttons and arrow keys.
StylestringInline style added to the root element.
ValueDouble?Current value. Use with @bind-Value.

Events

EventTypeDescription
ValueChangedEventCallback<Double?>Raised when the value changes.

Package

PercentField is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.