Class VTextField
- Namespace
- Velvet.Experimental
- Assembly
- Velvet.Docs.dll
EXPERIMENTAL. Initializer-style builder for a text field. Maps to TextField(string?, string?, Action<string>?, string?, string?, string?, bool?, bool?, Func<VisualElement, Action>?, string?, string?, string?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?, string?, int?, bool?, bool?, bool?, TouchScreenKeyboardType?, bool?, Action<string>?, EventCallback<KeyDownEvent>?, EventCallback<KeyUpEvent>?, EventCallback<FocusInEvent>?, EventCallback<FocusOutEvent>?, Action<VisualElement>?, FiberEventBinding[]?). Text fields are leaves; children added via the collection initializer are ignored.
public sealed class VTextField : VBuilder
- Inheritance
-
objectVTextField
- Inherited Members
Constructors
Properties
- AutoCorrection
Written to the field's autoCorrection (HTML
autocorrect).
- Enabled
When false, disables user input.
- IsDelayed
When true, the value is not updated per keystroke but on Enter, on the field losing focus, and on a later render taking the flag off.
- IsPasswordField
When true, masks the input as a password field.
- IsReadOnly
When true, the field cannot be edited.
- KeyboardType
Written to the field's keyboardType (HTML
inputmode).
- Label
Label text shown next to the field.
- MaxLength
Maximum number of characters the field accepts, -1 for no limit.
- Multiline
When true, the field is multi-line.
- OnBlur
Handler invoked when focus leaves the field for somewhere outside it.
- OnChange
Handler invoked when the input text changes.
- OnFocus
Handler invoked when focus enters the field from outside it.
- OnKeyDown
Handler invoked for each key pressed while the field holds focus, before the field takes it.
- OnKeyUp
Handler invoked for each key released while the field holds focus.
- OnSubmit
Handler invoked with the value when Enter commits a single-line field.
- Placeholder
A short hint shown in the empty field.
- Value
Current text value (controlled).