Raxol.UI.Components.Input.TextInput (Raxol v0.2.0)
View SourceA text input component for capturing user text input.
Features:
- Customizable placeholder text
- Value binding
- Focus handling
- Character validation
- Input masking (for password fields)
- Event callbacks
Summary
Types
@type props() :: %{ optional(:id) => String.t(), optional(:value) => String.t(), optional(:placeholder) => String.t(), optional(:on_change) => (String.t() -> any()), optional(:on_submit) => (String.t() -> any()), optional(:on_cancel) => (-> any()) | nil, optional(:theme) => map(), optional(:mask_char) => String.t() | nil, optional(:max_length) => integer() | nil, optional(:validator) => (String.t() -> boolean()) | nil }
@type state() :: %{cursor_pos: non_neg_integer(), focused: boolean()}