Skip to content

smelt.input

Tier: UiHost - Requires a terminal UI; calling these from headless mode raises.

Visibility: Public - Stable Lua API intended for user config and plugins.

Single-line input handle constructor. smelt.input.new(opts) returns an Input userdata that owns a buffer/window pair wired to shared line-input editing semantics.

smelt.input.new

fun(opts: table?): smelt.input.Input?

Types: smelt.input.Input

Create a single-line input and return an Input handle. Options: text?, placeholder?, plus window opts accepted by smelt.win.new (region, name, pad_left, pad_right, wrap, scrollbar, etc.).