Class TwNumericTheme
- Namespace
- TwBlazor.Configuration.Components
- Assembly
- TwBlazor.dll
Theme configuration for numeric fields (TwNumeric<T>). Override any property to customize numeric field styles globally.
[ExcludeFromCodeCoverage]
public class TwNumericTheme
- Inheritance
-
TwNumericTheme
- Inherited Members
Remarks
The field is a TwTextfield<T>, so its border, background, focus ring, sizes, clear button and the rows drawn over its start and end come from TwInputTheme. This theme only covers the prefix and suffix text and the decrease and increase buttons. The field's padding is widened to make room for them, assuming each button is 2rem wide.
Constructors
TwNumericTheme()
public TwNumericTheme()
Properties
Adornment
Gets or sets the classes for the prefix and suffix text, such as a currency symbol or a unit.
public required string Adornment { get; set; }
Property Value
Remarks
The text is read out as part of the field's value, and needs the 4.5:1 text contrast ratio against the field.
Button
Gets or sets the classes for the decrease and increase buttons, including their hover and disabled states. Each button is 2rem wide and as tall as the field.
public required string Button { get; set; }
Property Value
ButtonIcon
Gets or sets the classes for the icon inside each button.
public required string ButtonIcon { get; set; }