Introducing React Terminal: A customizable terminal component for your React applications.
Here's what it provides:
IndexedDB
): Save and recall terminal history for a more convenient user experience.The Project follows a Compound component pattern. You can use the components to build your own terminal. Each Components extends from Either a div
or textarea
(in case of input textarea) element so you can pass the element props to the components.
Install the package:
npm install @envoy1084/react-terminal
# or
yarn add @envoy1084/react-terminal
# or
pnpm add @envoy1084/react-terminal
# or
bun add @envoy1084/react-terminal
Usage:
import {
Terminal,
TerminalInputBox,
TerminalLoader,
TerminalOutput,
TerminalTitleBar,
TerminalWelcomeMessage,
} from '@envoy1084/react-terminal';
const MyComponent = () => {
return (
<Terminal>
<TerminalTitleBar>
<TerminalTitleBar.ActionGroup />
<TerminalTitleBar.Title />
</TerminalTitleBar>
<TerminalWelcomeMessage />
<TerminalOutput />
<TerminalInputBox>
<TerminalInputBox.Prompt />
<TerminalInputBox.TextArea />
</TerminalInputBox>
<TerminalLoader />
</Terminal>
);
};
export default MyComponent;
If you have any ideas on how to improve the project, feel free to contribute! Please read the contributing guidelines before submitting a pull request.
This project is licensed under the MIT License - see the LICENSE
Generated using TypeDoc