> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanmenu.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# ⌨️ | Custom Input Text Box

> Creates and draws leans input box

## Create text box

Displays a TextBox that executes the user’s input.

```lua theme={null}
LeanAPI.TextBox(placeholder, title, onlyNumbers, maxChars, callback)
```

### Parameters

* `placeholder` (string) - Placeholder text shown in the input field
* `title` (string) - Title displayed on the text box
* `onlyNumbers` (boolean) - If true, only accepts numeric input
* `maxChars` (number) - Maximum number of characters allowed. Don't include for no limit
* `callback` (function) - Function called with the input value when submitted

### Returns

```text theme={null}
Nothing
```

### Example

```lua theme={null}
LeanAPI.TextBox("Enter text", "Input Box", false, 100, function(input)
    print(input)
end)
```

### Example with trigger

```lua theme={null}
-- Boolean accepts numbers only, up to 10 digits
LeanAPI.TextBox("Enter Amount", "Add Money", true, 10, function(amount)
    local amt = tonumber(amount)
    LeanAPI.TriggerServerEvent({ resource = "lean_jobs" }, 'lean:collect:pay_check', amt)
end)
```
