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 sub">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-7 col-lg-7 pull-right" style={{/*z-index:1020;*/}}>
<div id="carousel-example-generic" class="carousel slide">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class=""></li>
<li data-target="#carousel-example-generic" data-slide-to="1" class="active"></li>
</ol>
<div class="carousel-inner">
<div class="item">
<img src="https://www.bootdey.com/image/650x300/87CEFA/000000" alt="item"/>
<div class="carousel-caption">
<p>Item 1</p>
</div>
</div>
<div class="item active">
<img src="https://www.bootdey.com/image/650x300/FF7F50/000000" alt="item"/>
<div class="carousel-caption">
<p>Item 2</p>
</div>
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
<hr/>
</div>
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
<div class="well">
<h2>ABOUT PROJECT</h2>
<p class="">Here goes sub-title. Write few words about your awesome project</p>
</div>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
</p>
</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;}