Documentation
Terminal

Terminal

The Terminal component is used to render the terminal.

It takes the following props:

  • theme: Theme? - The theme for the terminal.
  • fontSize: number? - The font size for the terminal. defaults to 16
  • autoScroll: boolean? - Determines whether to auto scroll the terminal or not. defaults to true
  • commands: Command[]? - An array of commands available in the terminal. defaults to []
  • enableDefaultCommands: boolean? - Determines whether to enable the default commands or not. defaults to true
  • defaultHandler: Command? - The default command handler.

Example:

import { Terminal, themes } from '@envoy1084/react-terminal';
 
const MyComponent = () => {
  return (
    <Terminal theme={themes.aurora_x} fontSize={18} commands={[]}>
      {/** Other Terminal Components */}
    </Terminal>
  );
};
 
export default MyComponent;