Raxol.Components.Input.TextInput (Raxol v0.2.0)

View Source

A text input component for single-line text entry.

Features:

  • Cursor management
  • Text selection
  • Copy/paste support
  • Password masking
  • Placeholder text

Summary

Types

state()

@type state() :: %{
  value: String.t(),
  cursor: non_neg_integer(),
  selection: {non_neg_integer(), non_neg_integer()} | nil,
  focused: boolean(),
  placeholder: String.t() | nil,
  password: boolean()
}

Functions

broadcast(msg)

command(cmd)

mount(state)

Callback implementation for Raxol.UI.Components.Base.Component.mount/1.

schedule(msg, delay)

unmount(state)

Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.