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 id="principal-content">
<div class="container bootstrap snippets bootdey">
<div class="row">
<div class="col-md-12">
<article>
<header>
<h2 class="text-primary text-center">
Bootdey.com
</h2>
</header>
<div class="row" id="design">
<div class="col-md-4 col-md-offset-1">
<div class="home-design-info">
<figure>
<img class="img-circle img-thumbnail" src="https://bootdey.com/img/Content/avatar/avatar7.png"/>
</figure>
</div>
</div>
<div class="col-md-6">
<div class="deets">
<h3 class="text-primary"><span class="glyphicon glyphicon-arrow-right"></span> My personal description</h3>
<p>Hello, this is my personal description
I am writing texts that come out of my mind
in order not to lorem ipsum
the following will say that bootdey is a gallery of snippets for bootstrap
Csss Js HTML codes.</p>
</div>
</div>
</div>
<div class="row" id="develop">
<div class="col-md-4 col-md-push-7">
<div class="home-dev-info">
<figure>
<img class="img-circle img-thumbnail" src="https://bootdey.com/img/Content/avatar/avatar6.png"/>
</figure>
</div>
</div>
<div class="col-md-6 col-md-pull-3">
<div class="deets">
<h3 class="text-primary">Second step in my description.<span class="glyphicon glyphicon-arrow-left"></span> </h3>
<p>
Here too I put much text
but not to use lorem ipsum I am writing this
Once writing we will obtain a snippet
Thanks to bootdey snippets Html Css Js
</p>
</div>
</div>
</div>
</article>
</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{
background:#eee;
}
.home-design-info figure img, .home-dev-info figure img{
width: 200px;
height:200px;
}
#principal-content {
background: none repeat scroll 0 0 #fff;
padding: 0;
position: relative;
z-index: 980;
}
#principal-content #develop {
margin: 1em 0;
text-align: center;
}