Skip to content
You are viewing documentation for v0.10. Switch to latest (main).

ftxui::InputOption ​

cpp
#include <ftxui/component/component_options.hpp>

Option for the Input component.

Examples: component/homescreen, component/input

Summary ​

SymbolDescription
on_changeCalled when the content changes.
on_enterCalled when the user presses enter.
passwordObscure the input content using '*'.
cursor_positionWhen set different from -1, this attributes is used to store the cursor position.

Public Attributes ​

on_change ​

cpp
std::function< void()> on_change = [] {};

Called when the content changes.

on_enter ​

cpp
std::function< void()> on_enter = [] {};

Called when the user presses enter.

password ​

cpp
Ref< bool > password = false;

Obscure the input content using '*'.

Examples: component/input

cursor_position ​

cpp
Ref< int > cursor_position = -1;

When set different from -1, this attributes is used to store the cursor position.