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

# Input

> A text field that commits when the player is done.

An input is a text field. It commits when the player clicks away or presses enter, not on every keystroke.

<Frame>
  <img src="https://mintcdn.com/sirius-b451bfde/f6FV7zSG5WdJNsXv/images/gen2/fields.png?fit=max&auto=format&n=f6FV7zSG5WdJNsXv&q=85&s=07d6c9ff9dea5916c41fd4ed8886ac08" alt="Input, keybind, and color picker elements" width="705" height="730" data-path="images/gen2/fields.png" />
</Frame>

```lua theme={null}
tab:CreateInput({
    name = "Max players",
    numeric = true,
    value = "16",
    placeholder = "Enter a number",
    callback = function(text)
        print("Committed:", text)
    end,
})
```

<Note>
  Inputs are full-width and live at the tab level. Create them directly on the tab, not inside a group.
</Note>

## Properties

<ResponseField name="name" type="string">
  The label.
</ResponseField>

<ResponseField name="description" type="string">
  Hint text under the label. Optional.
</ResponseField>

<ResponseField name="icon" type="string | number">
  An icon shown beside the label. Optional.
</ResponseField>

<ResponseField name="value" type="string">
  The initial text.
</ResponseField>

<ResponseField name="placeholder" type="string">
  Ghost text shown while the field is empty.
</ResponseField>

<ResponseField name="numeric" type="boolean" default="false">
  Accept numbers only. Commits a clean number, and clears if the text is malformed.
</ResponseField>

<ResponseField name="clearOnFocus" type="boolean" default="false">
  Empty the field when it gains focus.
</ResponseField>

<ResponseField name="flag" type="string" default="name">
  The save key. Optional.
</ResponseField>

<ResponseField name="forgetState" type="boolean" default="false">
  Skip saving.
</ResponseField>

<ResponseField name="callback" type="function">
  Runs with the text on commit.
</ResponseField>

## Handle

<ResponseField name=".value" type="string">
  The current text.
</ResponseField>

<ResponseField name="Set(value, skipCallback?)">
  Set the text.
</ResponseField>
