InputProps
Hierarchy
- PromptProps<string>
- InputProps
Index
Properties
optionaldefaultValue
optionalhideCursor
Hide the cursor in the terminal. Will remove the background color, but still functions.
label
Label to display before or above the prompt itself.
optionalmask
Mask to replace every inputted character with.
optionalonChange
Callback triggered when the value changes.
onSubmit
Callback triggered when the value is submitted.
optionalplaceholder
Custom string to display when the value is empty and non-dirty.
optionalprefix
Single character symbol to display before the label. Defaults to "?"".
optionalvalidate
Function to validate the value on submit. To trigger a failed state, thrown an Error
.
A default value. If none provided, will use an empty state.