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="container bootstrap snippets bootdey">
<div class="row">
<div class="col-md-3">
<div class="panel rounded shadow">
<div class="panel-body">
<div class="inner-all">
<ul class="list-unstyled">
<li class="text-center">
<img class="img-circle img-responsive img-bordered-primary" src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="Marint month"/>
</li>
<li class="text-center">
<h4 class="text-capitalize">Marint month</h4>
<p class="text-muted text-capitalize">web designer</p>
</li>
<li>
<a href="" class="btn btn-success text-center btn-block">PRO Account</a>
</li>
<li><br/></li>
<li>
<div class="btn-group-vertical btn-block">
<a href="" class="btn btn-default"><i class="fa fa-cog pull-right"></i>Edit Account</a>
<a href="" class="btn btn-default"><i class="fa fa-sign-out pull-right"></i>Logout</a>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-md-9">
<div class="panel cover rounded shadow no-overflow">
<div class="panel-body">
<div class="inner-cover">
<img src="https://www.bootdey.com/image/600x150/FF69B4/000000" class="img-responsive full-width" alt="cover"/>
</div>
</div>
</div>
<div class="panel cover rounded shadow no-overflow" style={{/*height:200px;*/}}>
<div class="panel-body">
content!!
</div>
</div>
</div>
</div>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
body{
background:#eee;
margin-top:20px;
}
.shadow {
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) !important;
-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) !important;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05) !important;
}
.rounded {
-webkit-border-radius: 3px !important;
-moz-border-radius: 3px !important;
border-radius: 3px !important;
}
.panel {
border: none;
position: relative;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn{
border-radius:0px;
}
.profile-cover {
width: 100%;
}
.profile-cover .cover {
position: relative;
border: 10px solid #FFF;
background:#fff;
}
.profile-cover .cover .inner-cover {
overflow: hidden;
height: auto;
}
.profile-cover .cover .inner-cover .cover-menu-mobile {
position: absolute;
top: 10px;
right: 10px;
}
.full-width {
top: 0;
left: 0;
/* Preserve aspet ratio */
min-width: 100%;
min-height: 100%;
}