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>
<section class="ftco-section bg-light">
<div class="container">
<div class="row justify-content-center pb-5 mb-3">
<div class="col-md-7 heading-section text-center ftco-animate fadeInUp ftco-animated">
<h2>Affordable Packages</h2>
</div>
</div>
<div class="row">
<div class="col-md-4 ftco-animate fadeInUp ftco-animated">
<div class="block-7">
<div class="img" style={{/*background-image: url(https://www.bootdey.com/image/350x280/FFB6C1/000000);*/}}></div>
<div class="text-center p-4">
<span class="excerpt d-block">Personal</span>
<span class="price"><sup>$</sup> <span class="number">49</span> <sub>/mos</sub></span>
<ul class="pricing-text mb-5">
<li><span class="fa fa-check mr-2"></span>5 Dog Walk</li>
<li><span class="fa fa-check mr-2"></span>3 Vet Visit</li>
<li><span class="fa fa-check mr-2"></span>3 Pet Spa</li>
<li><span class="fa fa-check mr-2"></span>Free Supports</li>
</ul>
<a href="#/" class="btn btn-primary d-block px-2 py-3">Get Started</a>
</div>
</div>
</div>
<div class="col-md-4 ftco-animate fadeInUp ftco-animated">
<div class="block-7">
<div class="img" style={{/*background-image: url(https://www.bootdey.com/image/350x280/87CEFA/000000);*/}}></div>
<div class="text-center p-4">
<span class="excerpt d-block">Business</span>
<span class="price"><sup>$</sup> <span class="number">79</span> <sub>/mos</sub></span>
<ul class="pricing-text mb-5">
<li><span class="fa fa-check mr-2"></span>5 Dog Walk</li>
<li><span class="fa fa-check mr-2"></span>3 Vet Visit</li>
<li><span class="fa fa-check mr-2"></span>3 Pet Spa</li>
<li><span class="fa fa-check mr-2"></span>Free Supports</li>
</ul>
<a href="#/" class="btn btn-primary d-block px-2 py-3">Get Started</a>
</div>
</div>
</div>
<div class="col-md-4 ftco-animate fadeInUp ftco-animated">
<div class="block-7">
<div class="img" style={{/*background-image: url(https://www.bootdey.com/image/350x280/FF7F50/000000);*/}}></div>
<div class="text-center p-4">
<span class="excerpt d-block">Ultimate</span>
<span class="price"><sup>$</sup> <span class="number">109</span> <sub>/mos</sub></span>
<ul class="pricing-text mb-5">
<li><span class="fa fa-check mr-2"></span>5 Dog Walk</li>
<li><span class="fa fa-check mr-2"></span>3 Vet Visit</li>
<li><span class="fa fa-check mr-2"></span>3 Pet Spa</li>
<li><span class="fa fa-check mr-2"></span>Free Supports</li>
</ul>
<a href="#/" class="btn btn-primary d-block px-2 py-3">Get Started</a>
</div>
</div>
</div>
</div>
</div>
</section>
</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;}
.block-7 {
border-radius: 4px;
margin-bottom: 30px;
padding: 0;
overflow: hidden;
background: #fff;
-webkit-box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.05);
box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.05);
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
-webkit-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
transition: all 0.3s ease;
}
@media (max-width: 991.98px) {
.block-7 {
margin-top: 30px;
}
}
.block-7 .img {
height: 250px;
}
.block-7 .heading-2 {
font-size: 14px;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 600;
}
.block-7 .price {
margin: 0;
padding: 0;
display: block;
}
.block-7 .price sup {
font-size: 24px;
top: -1em;
color: #b3b3b3;
}
.block-7 .price .number {
font-size: 60px;
font-weight: 600;
color: #000000;
}
.block-7 .excerpt {
margin-bottom: 0px;
color: #00bd56;
font-size: 16px;
font-weight: 600;
text-transform: uppercase;
}
.block-7 .label2 {
text-transform: uppercase;
}
.block-7 .pricing-text,
.block-7 .pricing-text li {
padding: 0;
margin: 0;
}
.block-7 .pricing-text li {
list-style: none;
padding-top: 10px;
padding-bottom: 10px;
color: #000000;
}
.block-7 .pricing-text li:nth-child(odd) {
background: rgba(0, 0, 0, 0.05);
}
.block-7 .pricing-text li span.fa {
color: #207dff;
}
.block-7 .btn-primary {
color: #fff;
text-transform: uppercase;
font-style: 16px;
font-weight: 600;
letter-spacing: 1px;
width: 60%;
margin: 0 auto;
}
.block-7 .btn-primary:hover,
.block-7 .btn-primary:focus {
background: #00bd56 !important;
color: #fff;
}
.block-7:hover,
.block-7:focus {
-webkit-box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.11);
-moz-box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.11);
box-shadow: 0px 24px 48px -13px rgba(0, 0, 0, 0.11);
}