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 rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="container">
<div class="row">
<div class="col-md-6 col-lg-4">
<div class="card bg-primary card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-primary mtn-80">
<i class="fa fa-quote-left text-primary" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white"> James Smith <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Mary’s Father</cite></footer>
</blockquote>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card bg-success card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-success mtn-80">
<i class="fa fa-quote-left text-success" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white"> David Smith <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Susan’s Father</cite></footer>
</blockquote>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card bg-danger card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-danger mtn-80">
<i class="fa fa-quote-left text-danger" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white">William Smith <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Karen’s Father</cite></footer>
</blockquote>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card bg-info card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-info mtn-80">
<i class="fa fa-quote-left text-info" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white">Daniel Smith <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Lisa’s Father</cite></footer>
</blockquote>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card bg-purple card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-purple mtn-80">
<i class="fa fa-quote-left text-purple" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white"> Mike Jones <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Linda’s Father</cite></footer>
</blockquote>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<div class="card bg-pink card-hover mb-9">
<div class="card-body text-center px-md-5 px-lg-6 my-2">
<div class="card-icon-border-large border-pink mtn-80">
<i class="fa fa-quote-left text-pink" aria-hidden="true"></i>
</div>
<blockquote class="blockquote blockquote-sm mt-2">
<p class="font-normal mb-5"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt.</p>
<footer class="blockquote-footer text-uppercase text-white">Nicholas <cite class="d-block text-capitalize font-size-14 opacity-80 mt-1" title="Source Title">Donna’s Father</cite></footer>
</blockquote>
</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{margin-top:20px;
padding-top:80px;
}
.card {
box-shadow: rgba(0, 0, 0, 0.1) 0px 8px 0px;
position: relative;
margin-bottom: 1.56rem;
}
.card {
position: relative;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
min-width: 0px;
overflow-wrap: break-word;
background-color: rgb(248, 248, 248);
background-clip: border-box;
border: 0px solid rgba(0, 0, 0, 0.125);
border-radius: 0.57rem;
}
.bg-primary {
background-color: rgb(240, 194, 75) !important;
}
.mb-9 {
margin-bottom: 4.96rem !important;
}
.card-icon-border-large {
width: 100px;
height: 100px;
margin: -3.06rem auto 0px;
text-align: center;
background-color: rgb(255, 255, 255);
border: 6px solid;
border-radius: 50%;
font-size: 1.88rem;
line-height: 90px;
color: rgb(102, 102, 102);
}
.mtn-80 {
margin-top: -5rem !important;
}
.border-primary {
border-color: rgb(240, 194, 75) !important;
}
.text-primary {
color: rgb(240, 194, 75) !important;
}
.bg-success {
background-color: rgb(181, 213, 106) !important;
}
.border-success {
border-color: rgb(181, 213, 106) !important;
}
.text-success {
color: rgb(181, 213, 106) !important;
}
.bg-danger {
background-color: rgb(234, 112, 102) !important;
}
.border-danger {
border-color: rgb(234, 112, 102) !important;
}
.text-danger {
color: rgb(234, 112, 102) !important;
}
.bg-info {
background-color: rgb(132, 190, 214) !important;
}
.border-info {
border-color: rgb(132, 190, 214) !important;
}
.text-info {
color: rgb(132, 190, 214) !important;
}
.bg-purple {
background-color: rgb(165, 151, 231) !important;
}
.border-purple {
border-color: rgb(165, 151, 231) !important;
}
.text-purple {
color: rgb(165, 151, 231) !important;
}
.bg-pink {
background-color: rgb(234, 119, 173) !important;
}
.border-pink {
border-color: rgb(234, 119, 173) !important;
}
.text-pink {
color: rgb(234, 119, 173) !important;
}