1.0.14 • Published 2 years ago

terminal-io v1.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

terminal-io

This is a terminal for React web apps.

Installation

1- Create a new react app

npx create-react-app my-terminal-project cd my-terminal-project

2- Install terminal-io

npm i terminal-io or yarn add terminal-io

3- Update your body style

/* src/index.css */

body {
  padding: 16px;
  margin: 0;
  background: #211d1b;
}

4- Add terminal-io into your project

update App.js and add these codes

// src/App.js

import "./index.css";
import Terminal from "terminal-io";
import React from "react";

const App = () => {
  const commands = [
    { name: "summary", value: () => <p>This is summary text</p> },
  ];
  return <Terminal commands={commands} />;
};

export default App;

5- Run the project

npm run start or yarn start

6- Go to localhost server

http://localhost:3000/

Events

EventDescription
onEnterWhen the user presses the enter
onDidMountWhen the component install successfully

Props

PropDescription
initialDataThis data will add the command line automatically when the component loaded
commandsAll command list

Demo

https://salihkesepara.com

Realworl example

https://github.com/salihkesepara/salihkeseparacom

License

MIT

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.1

2 years ago