jonmbake / react-terminal-ui

A terminal react component with support for light and dark modes.
https://jonmbake.github.io/react-terminal-ui/demo/
MIT License
205 stars 30 forks source link

Allow more control over terminal input via component API #13

Open jonmbake opened 3 years ago

jonmbake commented 3 years ago

Is your feature request related to a problem? Please describe. The API to the component does not allow much control over input behavior. For example, setting a value or performing some action on input change.

Describe the solution you'd like Add an InputController prop that allows setting input value and listening for input change. The API could be something like:

class InputController
  + triggerInputChange(String input)
  + onInputChange(String input)
  + onInputReceived(String input)

Describe alternatives you've considered Some alternatives were discussed in https://github.com/jonmbake/react-terminal-ui/issues/5

Additional context See https://github.com/jonmbake/react-terminal-ui/issues/5

joranbeasley commented 1 year ago

please fix arrow keys while you are at it :)