react-simple-terminal
v1.0.16
Published
A simplistic react terminal component.
Downloads
5
Readme
react-simple-terminal
- Mobile friendly
- Super simplistic
- Stylable
- Fixes tailwind outline border on focus.
- Allows async functions
Demo
Install
npm install --save react-simple-terminal
Usage
import { SimpleTerminal } from 'react-simple-terminal'
const App = () => {
const commands = {
hello: 'Hello world!',
'help': (args) => `HELP for args: ${args}`,
test: async() => (await fetch("https://wtfismyip.com/text")).text()
}
return (
<SimpleTerminal commands={commands} prompt={'$'} style={{ color: '#00ff00' }} />
)
}