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">
<div class="row bootstrap snippets bootdeys" id="property-list">
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/20B2AA/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-real-estates">
<strong><a href="#/">Property 1</a></strong> <span class="pull-right">$12,990</span>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p><span class="label label-danger">1,292 SqFt</span> | <span class="label label-danger">3 Beds</span> | <span class="label label-danger">4 Baths</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/FF7F50/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-real-estates">
<strong><a href="#/">Property 2</a></strong> <span class="pull-right">$12,990</span>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p><span class="label label-danger">1,292 SqFt</span> | <span class="label label-danger">3 Beds</span> | <span class="label label-danger">4 Baths</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/87CEFA/000000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-real-estates">
<strong><a href="#/">Property 3</a></strong> <span class="pull-right">$12,990</span>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p><span class="label label-danger">1,292 SqFt</span> | <span class="label label-danger">3 Beds</span> | <span class="label label-danger">4 Baths</span></p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="panel">
<div class="panel-body">
<div class="row">
<div class="col-sm-5">
<a href="#/"><img src="https://www.bootdey.com/image/300x300/FFB6C1/00000" class="img-responsive"/></a>
</div>
<div class="col-sm-7">
<h4 class="title-real-estates">
<strong><a href="#/">Property 4</a></strong> <span class="pull-right">$12,990</span>
</h4>
<hr/>
<p>Iki kie mung omah lodong dadiine rodo murah tur yo ra awet wong karang mung murah, nek pingin awet yo tuku omah-omahan wae sing ra iso rusak.</p>
<p><span class="label label-danger">1,292 SqFt</span> | <span class="label label-danger">3 Beds</span> | <span class="label label-danger">4 Baths</span></p>
</div>
</div>
</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-color: #f2f2f2;
margin-top:20px;
}
.panel {
border-color: #fff;
}
#property-list img {
width: 100%;
height: 170px;
border: 5px solid #ecf0f1;
margin-bottom: 7px;
}
.label-danger {
background-color: #d9534f;
}
#property-list h4.title-real-estates a {
color: #f39c12;
}
#property-list h4.title-real-estates a:hover {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
color: #f1c40f;
}
#property-list h4 span {
color: #f1c40f;
}