You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A [React](https://github.com/facebook/react) terminal component with support for light/dark modes. Styling is courtesy of [termynal.js](https://github.com/ines/termynal).
7
+
A terminal [React](https://github.com/facebook/react) component with support for light and dark modes. Styling is courtesy of [termynal.js](https://github.com/ines/termynal).
9
8
10
9
Check out the **[Demo](https://jonmbake.github.io/react-terminal-ui/demo/)**:heart_eyes:
_React Terminal UI_ is a "dumb component"-- whatever props you pass in, it will render. You usually want to have
25
-
a smart, controller component that controls terminal state. For example:
23
+
React Terminal UI is a "dumb component"—it renders whatever props you pass in. Typically, you'll want a controller component to manage the terminal's state. For example:
|`name`| Name of the terminal. Displays at the top of the rendered component. In the demo, the name is set to React Terminal UI. |
56
-
|`colorMode`| Terminal color mode - either Light or Dark. Defaults to Dark. |
57
-
|`onInput`| An optional callback function that is invoked when a user presses enter on the prompt. The function is passed the current prompt input. If the onInput prop is not passed, the prompt input line will not display in the terminal. |
58
-
|`startingInputValue`| Starting input value. If this prop changes, any user-entered input will be overridden by this value. Defaults to the empty string ("").|
59
-
|`prompt`| The prompt character. Defaults to '$'.|
60
-
|`height`| Height of the terminal. Defaults to 600px.|
61
-
|`redBtnCallback`| Optional callback function for the red button. If provided, the function will be invoked when the red button is clicked. |
62
-
|`yellowBtnCallback`| Optional callback function for the yellow button. If provided, the function will be invoked when the yellow button is clicked. |
63
-
|`greenBtnCallback`| Optional callback function for the green button. If provided, the function will be invoked when the green button is clicked. |
64
-
|`TopButtonsPanel`| Optional - way to control which buttons are displays in top buttons panel. Pass `TopButtonsPanel={()=> null}` to hide top buttons panel. |
|`name`| Name of the terminal. Displays at the top of the rendered component. In the demo, the name is set to React Terminal UI.|
56
+
|`colorMode`| Terminal color mode—either Light or Dark. Defaults to Dark.|
57
+
|`onInput`| An optional callback function that is invoked when a user presses enter on the prompt. The function is passed the current prompt input. If the `onInput` prop is not provided, the prompt input line will not display in the terminal. |
58
+
|`startingInputValue`| Starting input value. If this prop changes, any user-entered input will be overridden by this value. Defaults to an empty string (`""`). |
59
+
|`prompt`| The prompt character. Defaults to `$`. |
60
+
|`height`| Height of the terminal. Defaults to `600px`. |
61
+
|`redBtnCallback`| Optional callback function for the red button. If provided, the function will be invoked when the red button is clicked.|
62
+
|`yellowBtnCallback`| Optional callback function for the yellow button. If provided, the function will be invoked when the yellow button is clicked.|
63
+
|`greenBtnCallback`| Optional callback function for the green button. If provided, the function will be invoked when the green button is clicked.|
64
+
|`TopButtonsPanel`| Optional - way to control which buttons are displayed in the top buttons panel. Pass `TopButtonsPanel={()=> null}` to hide top buttons panel.|
65
65
66
66
67
67
### Development
68
68
69
-
Make sure to run `npm run install-peers` after `npm install` so peer dependencies are also installed.
69
+
After running `npm install`, ensure that peer dependencies are installed by executing `npm run install-peers`.
0 commit comments