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-7">
<section class="panel">
<div class="panel-body profile-wrapper">
<div class="col-md-3">
<div class="profile-pic text-center">
<img src="https://bootdey.com/img/Content/user-453533-fdadfd.png" alt="" class="img-circle"/>
</div>
</div>
<div class="col-md-9">
<div class="profile-info">
<h1>Aaron Adams</h1>
<span class="text-muted">UI Designer</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
<div class="connect">
<button type="button" class="btn btn-success btn-trans"><span class="fa fa-check"></span> Following</button>
<button type="button" class="btn btn-primary btn-trans"><span class="fa fa-comments"></span> Chat</button>
</div>
<div class="social">
<ul>
<li><a href="#/"><i class="fa fa-lg fa-facebook"></i></a>
</li>
<li><a href="#/"><i class="fa fa-lg fa-twitter"></i></a>
</li>
<li><a href="#/"><i class="fa fa-lg fa-github"></i></a>
</li>
<li><a href="#/"><i class="fa fa-lg fa-linkedin"></i></a>
</li>
<li><a href="#/"><i class="fa fa-lg fa-instagram"></i></a>
</li>
<li><a href="#/"><i class="fa fa-lg fa-dribbble"></i></a>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="col-md-5">
<section class="panel timeline-post-to">
<div class="panel-body">
<form role="form">
<textarea class="form-control" placeholder="What's on your mind?"></textarea>
<div class="row">
<div class="col-sm-6">
<a class="btn btn-sm btn-default"><i class="fa fa-camera"></i></a>
<a class="btn btn-sm btn-default"><i class="fa fa-video-camera"></i></a>
<a class="btn btn-sm btn-default"><i class="fa fa-music"></i></a>
<a class="btn btn-sm btn-default"><i class="fa fa-map-marker"></i></a>
</div>
<div class="col-sm-6 text-right">
<button type="submit" class="btn btn-primary">Post</button>
</div>
</div>
</form>
</div>
</section>
<section class="panel timeline-post">
<div class="panel-body" style={{/*height:280px;*/}}>
post goes here!
</div>
</section>
</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 {
color: #565656;
background: #F0F3F3;
font-family: "Open Sans", Helvetica, Arial, sans-serif;
font-size: 100%;
padding: 0px;
margin: 0px;
min-height: 100%;
position: relative;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
margin-top:20px;
}
.panel {
border: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
}
.panel-body {
padding: 15px;
}
.profile-pic {
margin: 20px 0 0 0;
}
.profile-pic img {
border: 7px solid #e5e6ea;
}
img {
max-width: 100%;
}
h1, .h1 {
font-size: 1.375em;
}
p {
font-size: 12px;
}
.profile-info .connect {
margin: 15px 0 5px 0;
}
.profile-info .connect button {
margin-right: 15px;
}
.btn-success.btn-trans {
color: #27b6af;
background-color: transparent;
border: solid thin #27b6af;
}
.btn-primary.btn-trans {
color: #556b8d;
background-color: transparent;
border: solid thin #556b8d;
}
.social {
margin: 0;
padding: 0;
}
.social ul {
margin: 0;
padding: 5px;
}
.social ul li {
margin: 5px;
list-style: none outside none;
display: inline-block;
}
.social i {
width: 40px;
height: 40px;
color: #FFF;
background-color: #909AA0;
font-size: 22px;
text-align: center;
padding-top: 12px;
border-radius: 50%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
-o-border-radius: 50%;
transition: all ease 0.3s;
-moz-transition: all ease 0.3s;
-webkit-transition: all ease 0.3s;
-o-transition: all ease 0.3s;
-ms-transition: all ease 0.3s;
}
.timeline-post-to textarea {
min-height: 80px;
margin-bottom: 15px;
}
.form-control {
border: 2px solid #e8ebed;
border-radius: 2px;
box-shadow: none;
height: 37px;
padding: 8px 12px 9px 12px;
}