TextInputStyle

Defines the visual settings of a text input.

Fields

  • border_style (BorderStyle): Defines the style of the background border.
  • selection_background (brush): Defines the background of the text selection: (default value: black)
  • selection_foreground (brush): Defines the foreground of the text selection: (default value: black)
  • icon_style (IconStyle): Defines the style of the prefix_icon.
  • text_style (TextStyle): Defines the style of the text input.
  • placeholder_style (TextStyle): Defines the style of the placeholder text.
  • padding_left (length): Defines the padding on the left side of the text input layout. (default value: 0)
  • padding_right (length): Defines the padding on the right side of the text input layout. (default value: 0)
  • padding_top (length): Defines the padding on the top side of the text input layout. (default value: 0)
  • padding_bottom (length): Defines the padding on the bottom side of the text input layout. (default value: 0)
  • spacing (length): Defines the distance between elements in the text input layout. (default value: 0) text.
  • layout_style (LayoutStyle): Defines the style of the layout.

TextInputBaste

The TextInputBaste represents the base for text input components.

Properties

  • enabled (in bool): If set to false the text input is disabled.
  • has_error (in bool): If set to true the text input is displayed in the error state.
  • text (in_out string): The text being edited.
  • placeholder_text (in string): A placeholder text being shown when there is no text in the text input.
  • style (in TextInputStyle): Defines the style of the text input.

Callbacks

  • accepted(/* text */ string): Enter was pressed.
  • edited(/* text */ string): Emitted when the text has changed because the user modified it.