1. First, we need fresh reactjs setup, and for that, we need to run below commands into out terminal, and also we should have latest node version installed on our system:
npx create-react-app my-awesome-project
cd my-awesome-project
npm start
2. Now we need to run below commands into our project terminal to get bootstrap and related modules into our reactjs application:
npm install [email protected] --save
npm start //For start project again
3. Finally for the main output, we need to add below code into our my-awesome-project/src/App.js file or if you have fresh setup then you can replace my-awesome-project/src/App.js file code with below code:
import React from 'react';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<div>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="wrapper-page bootstrap snippets bootdeys">
<div class="text-center">
<a href="#/" class="logo logo-lg">
<i class="fa fa-th"></i>
<span>Bootdey.com</span>
</a>
</div>
<form method="post" action="#" role="form" class="text-center m-t-20">
<div class="user-thumb">
<img src="https://bootdey.com/img/Content/avatar/avatar1.png" class="img-responsive img-circle img-thumbnail" alt="thumbnail"/>
</div>
<div class="form-group">
<h3>John Deo</h3>
<p class="text-muted">Enter your password to access the admin.</p>
<div class="input-group m-t-30">
<input type="password" class="form-control" placeholder="Password"/>
<span class="input-group-btn"> <button type="submit" class="btn btn-email btn-info waves-effect waves-light">
Log In
</button> </span>
</div>
</div>
<div class="text-right">
<a href="#/" class="text-muted">Not John Deo ?</a>
</div>
</form>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
body {
background: #f5f5f5;
font-family: 'Noto Sans', sans-serif;
margin: 0;
color: #4c5667;
overflow-x: hidden !important;
}
.wrapper-page {
margin: 7.5% auto;
width: 360px;
}
.wrapper-page .form-control-feedback {
left: 15px;
top: 3px;
color: rgba(76, 86, 103, 0.4);
font-size: 20px;
}
.logo {
color: #3bafda !important;
font-size: 18px;
font-weight: 700;
letter-spacing: .02em;
line-height: 70px;
}
.logo-lg {
font-size: 28px !important;
}
.logo i {
color: #f76397;
}
.user-thumb img {
height: 88px;
margin: 0px auto;
width: 88px;
}