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 bootstrap snippets bootdey">
<div class="profile card">
<div class="profile-body">
<div class="profile-bio">
<div class="row">
<div class="col-md-5 text-center">
<img class="img-thumbnail md-margin-bottom-10" src="https://bootdey.com/img/Content/user-453533-fdadfd.png" alt=""/>
</div>
<div class="col-md-7">
<h2>Edward Rooster</h2>
<span><strong>Job:</strong> Web Developer</span>
<span><strong>Position:</strong> Web Designer</span>
<hr/>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eget massa nec turpis congue bibendum. Integer nulla felis, porta suscipit nulla et, dignissim commodo nunc. Morbi a semper nulla.</p>
<p>Proin mauris odio, pharetra quis ligula non, vulputate vehicula quam. Nunc in libero vitae nunc ultricies tincidunt ut sed leo. Sed luctus dui ut congue consequat. Cras consequat nisl ante, nec malesuada velit pellentesque ac. Pellentesque nec arcu in ipsum iaculis convallis.</p>
</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 :
.card{
-moz-border-radius: 2%;
-webkit-border-radius: 2%;
border-radius: 2%;
box-shadow: 5px 5px 0 rgba(0,0,0,0.08);
}
.profile .profile-body {
padding: 20px;
background: #f7f7f7;
}
.profile .profile-bio {
background: #fff;
position: relative;
padding: 15px 10px 5px 15px;
}
.profile .profile-bio a {
left: 50%;
bottom: 20px;
margin: -62px;
text-align: center;
position: absolute;
}
.profile .profile-bio h2 {
margin-top: 0;
font-weight: 200;
}
h1, h2, h3, h4, h5, h6 {
color: #585f69;
margin-top: 5px;
text-shadow: none;
font-weight: normal;
font-family: 'Open Sans', sans-serif;
}
h2 {
font-size: 24px;
line-height: 33px;
}
p, li, li a {
color: #555;
}