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>
<link href="http://getbootstrap.com/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"/>
<div class="container bootstrap snippets bootdey">
<div class="header">
<h3 class="text-muted prj-name">
<span class="fa fa-users fa-2x principal-title"></span>
Friend zone
</h3>
</div>
<div class="jumbotron list-content">
<ul class="list-group">
<li href="#/" class="list-group-item title">
Your friend zone
</li>
<li href="#/" class="list-group-item text-left">
<img class="img-thumbnail" src="https://bootdey.com/img/Content/User_for_snippets.png"/>
<label class="name">
Juan guillermo cuadrado<br/>
</label>
<label class="pull-right">
<a class="btn btn-success btn-xs glyphicon glyphicon-ok" href="#/" title="View"></a>
<a class="btn btn-danger btn-xs glyphicon glyphicon-trash" href="#/" title="Delete"></a>
<a class="btn btn-info btn-xs glyphicon glyphicon glyphicon-comment" href="#/" title="Send message"></a>
</label>
<div class="break"></div>
</li>
<li href="#/" class="list-group-item text-left">
<img class="img-thumbnail" src="https://bootdey.com/img/Content/user_1.jpg"/>
<label class="name">
James Rodriguez (10)
</label>
<label class="pull-right">
<a class="btn btn-success btn-xs glyphicon glyphicon-ok" href="#/" title="View"></a>
<a class="btn btn-danger btn-xs glyphicon glyphicon-trash" href="#/" title="Delete"></a>
<a class="btn btn-info btn-xs glyphicon glyphicon glyphicon-comment" href="#/" title="Send message"></a>
</label>
<div class="break"></div>
</li>
<li href="#/" class="list-group-item text-left">
<img class="img-thumbnail" src="https://bootdey.com/img/Content/user_2.jpg"/>
<label class="name">
Mariana pajon
</label>
<label class="pull-right">
<a class="btn btn-success btn-xs glyphicon glyphicon-ok" href="#/" title="View"></a>
<a class="btn btn-danger btn-xs glyphicon glyphicon-trash" href="#/" title="Delete"></a>
<a class="btn btn-info btn-xs glyphicon glyphicon glyphicon-comment" href="#/" title="Send message"></a>
</label>
<div class="break"></div>
</li>
<li href="#/" class="list-group-item text-left">
<a class="btn btn-block btn-primary">
<i class="glyphicon glyphicon-refresh"></i>
Load more...
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
);
}
export default App;
4. Now we need to add below code into our my-awesome-project/src/App.css file :
.list-content{
min-height:300px;
}
.list-content .list-group .title{
background:#5bc0de;
border:2px solid #DDDDDD;
font-weight:bold;
color:#FFFFFF;
}
.list-group-item img {
height:80px;
width:80px;
}
.jumbotron .btn {
padding: 5px 5px !important;
font-size: 12px !important;
}
.prj-name {
color:#5bc0de;
}
.break{
width:100%;
margin:20px;
}
.name {
color:#5bc0de;
}