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>
<div class="container testimonials">
<div class="row">
<div class="col-md-4 testimonial">
<div class="row">
<div class="avatar col-md-5">
<a href="#/">
<img class="img-circle" src="https://bootdey.com/img/Content/user_3.jpg" alt="Taylor Otwell"/>
</a>
</div>
<div class="testimonial-main col-md-7">
<h4 class="media-heading"><a href="#m">Owenl Ollyt</a></h4>
<p class="testimony-body">bootstrap rules!</p>
</div>
</div>
</div>
<div class="col-md-4 testimonial">
<div class="row">
<div class="avatar col-md-5">
<a href="#/">
<img class="img-circle" src="https://bootdey.com/img/Content/user_2.jpg" alt="Taylor Otwell"/>
</a>
</div>
<div class="testimonial-main col-md-7">
<h4 class="media-heading"><a href="#/">Darla Marty</a></h4>
<p class="testimony-body">Bootdey rules!</p>
</div>
</div>
</div>
<div class="col-md-4 testimonial">
<div class="row">
<div class="avatar col-md-5">
<a href="#/">
<img class="img-circle" src="https://bootdey.com/img/Content/user_1.jpg" alt="Taylor Otwell"/>
</a>
</div>
<div class="testimonial-main col-md-7">
<h4 class="media-heading"><a href="#/">Maryou Mcjouin</a></h4>
<p class="testimony-body">Ok man!</p>
</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: #F9F9F9;
}
.testimonials {
margin-top: 40px;
}
.testimonial {
margin-bottom: 3em;
background: #fff;
padding: 2em;
border-right: 30px solid #F9F9F9;
min-height: 169px;
}
.testimonial:before {
content: "";
position: absolute;
z-index: -1;
-ms-transform: skew(-3deg,-2deg);
-webkit-transform: skew(-3deg,-2deg);
-o-transform: skew(-3deg,-2deg);
-moz-transform: skew(-3deg,-2deg);
bottom: 14px;
box-shadow: 0 16px 5px rgba(0,0,0,.04);
max-width: 90%;
width: 90%;
height: 50px;
left: 1px;
}
.avatar .img-circle {
background: #fff;
padding: 3px;
border: 1px solid #c5c5c5;
}
.avatar img {
max-width: 100%;
}
.img-circle {
border-radius: 50%;
}
.testimonial h4, .testimonial h4 a {
font-weight: 700;
}
.testimonial h4 {
margin-bottom: 8px;
}
.testimonial .testimony-body {
font-size: .9em;
}