Input
A text field at the 40px form height, with error and password modes.
Installation
bash
shellui-native add input
Platforms: MAUI · Avalonia.
Usage
Basic
<VerticalStackLayout Spacing="8">
<ui:ShellLabel Text="Email" Size="Sm" Weight="Medium" />
<ui:Input Placeholder="[email protected]" Keyboard="Email" />
</VerticalStackLayout><StackPanel Spacing="8">
<ui:ShellLabel Text="Email" Size="Sm" Weight="Medium" />
<ui:Input Placeholder="[email protected]" />
</StackPanel>Not available on yet
Password, error and read-only
<ui:Input Placeholder="Password" IsPassword="True" />
<ui:Input Text="shewart@" HasError="True" />
<ui:Input Text="Shewart Shepherd" IsReadOnly="True" /><ui:Input Placeholder="Password" IsPassword="True" />
<ui:Input Text="shewart@" HasError="True" />
<ui:Input Text="Shewart Shepherd" IsReadOnly="True" />Not available on yet
MAUI and Avalonia
Keyboard(the soft keyboard on phones) is MAUI only.MaxLength: no limit by default on both; on Avalonia0means no limit.
API
| Property | Type | Default | Description |
|---|---|---|---|
Text |
string |
— | Entered text. Two-way bindable. |
Placeholder |
string |
— | Hint shown while empty. |
IsPassword |
bool |
false |
Masks the text. |
HasError |
bool |
false |
Shows the destructive border and ring. |
IsReadOnly |
bool |
false |
Shows the text without allowing edits. |
MaxLength |
int |
No limit (MAUI) · 0 (no limit) (Avalonia) |
Maximum number of characters. |
Keyboard |
Keyboard |
Default |
Soft keyboard to show on touch devices. MAUI only. |
| Event | Arguments | Description |
|---|---|---|
TextChanged |
TextChangedEventArgs |
The text changed. |
Completed |
— | Every slot is filled (or Enter in a text field). |