input

Input characters through the mouse or keyboard

NOTE

Currently, the input box has relatively limited capabilities. We plan to launch more or more powerful input boxes in the next version

Examples

Basic usage

1<input
2    text="'Hello'"
3    height="36.0"
4    width="200.0">
5</input>

Properties

NameDescriptionType
themeThemeThemes
shadow_colorShadow colorMakepadColor
spread_radiusSpread radiusF32
blur_radiusBlur radiusF32
shadow_offsetShadow offsetVec2
placeholder_colorPlaceholder colorMakepadColor
colorColorMakepadColor
cursor_colorCursor colorMakepadColor
select_colorSelection colorMakepadColor
background_colorBackground colorMakepadColor
background_visibleBackground visiblebool
visibleVisiblebool
hover_colorHover colorMakepadColor
text_hover_colorText hover colorMakepadColor
text_focus_colorText focus colorMakepadColor
cursor_hover_colorCursor hover colorMakepadColor
cursor_focus_colorCursor focus colorMakepadColor
select_hover_colorSelection hover colorMakepadColor
select_focus_colorSelection focus colorMakepadColor
focus_colorFocus colorMakepadColor
border_colorBorder colorMakepadColor
border_widthBorder widthF32
border_radiusBorder radiusF32
font_sizeFont sizeF64
height_factorHeight factorF64
wrapText wrapping methodTextWrap
font_familyFont family pathLiveDependency
cursor_border_radiusCursor corner radiusF64
abs_posAbsolute positionDVec2
marginMarginMargin
widthWidthSize
heightHeightSize
scrollScroll offsetDVec2
clip_xClip X axis or notbool
clip_yClip Y axis or notbool
paddingPaddingPadding
alignAlignmentAlign
flowFlow modeFlow
spacingSpacingF64
cursor_widthCursor widthF64
read_onlyRead-onlybool
numeric_onlyNumeric input onlybool
placeholderPlaceholderString
textText contentString
event_keyEvent keybool

Event callback

NameDescriptionParameters
changedInput value change eventGInputChangedParam
keydown_unhandledUnhandled key press eventKeyEvent
escapedEsc key press event_
key_focusGet keyboard focus event_
key_focus_lostLose keyboard focus event_