Terminal Input Box
The Input Box component for the terminal. It takes two children:
Prompt
- The prompt to be displayed before the input box.TextArea
- The text area to be used for input.
Example:
<TerminalInputBox>
<TerminalInputBox.Prompt />
<TerminalInputBox.TextArea />
</TerminalInputBox>
Prompt
The prompt to be displayed before the input box. It is of form React.ReactNode
.
Example:
<TerminalInputBox.Prompt>
<span style={{ color: 'green' }}>$ </span>
</TerminalInputBox.Prompt>
TextArea
The text area to be used for input. It extends from HTMLTextAreaElement
. It takes the following props:
- cursor:
'underscore' | 'block' | 'bar' | React.ReactNode?
- The cursor to be displayed at the end of the input box. Default isunderscore
.
Example:
<TerminalInputBox.TextArea cursor='block' />