Number Input
A number field with decrement and increment buttons.
Installation
bash
shellui-native add number-input
Platforms: MAUI · Avalonia. Also installs icon.
Usage
Basic
<VerticalStackLayout Spacing="8">
<ui:ShellLabel Text="Guests" Size="Sm" Weight="Medium" />
<ui:NumberInput Value="2" Minimum="1" Maximum="8" />
</VerticalStackLayout><StackPanel Spacing="8">
<ui:ShellLabel Text="Guests" Size="Sm" Weight="Medium" />
<ui:NumberInput Value="2" Minimum="1" Maximum="8" />
</StackPanel>Not available on yet
MAUI and Avalonia
- MAUI shows the numeric keyboard on phones.
- On Avalonia, Up / Down step the value while the field has focus.
API
| Property | Type | Default | Description |
|---|---|---|---|
Value |
decimal? |
null |
Current value. Two-way bindable. |
Minimum |
decimal? |
null |
Smallest value. |
Maximum |
decimal? |
null |
Largest value. |
Step |
decimal |
1 |
Amount the arrow keys (or buttons) change the value by. |
Placeholder |
string |
— | Hint shown while empty. |
| Event | Arguments | Description |
|---|---|---|
ValueChanged |
decimal? |
User input only: setting Value from code or a binding doesn't raise it. |