React js UI example. Refresh Widget

React js UI example and template, Refresh Widget! . Take a look at this UI example and see how it can enhance your project. Your can copy or download the code and use it in your project. Don't forget to browse our library of other free React Native templates for even more design and functionality inspiration. Happy coding!
Tags: Refresh,Widget

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 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="panel panel-info"> 
            <div class="panel-heading">
            <h1>
            <span class="glyphicon glyphicon-th"></span>
            <a class="refresh pull-right" href="#/"><span class="fa fa-refresh"></span></a> <strong>Refresh Widget</strong>
             </h1>    
            </div>
          <div class="panel-body panel-refresh">
         	<div class="refresh-container"><i class="refresh-spinner fa fa-spinner fa-spin fa-5x"></i></div>
            <h4>Refresh Me: Please click on the refresh button </h4>
              <div class="jumbotron"> 
                This widget utilizes the simple <strong>$.refreshMe()</strong> plugin!
              </div>
              <div class="refresh-data"> 
              	This is the original data that will update upon refresh..
              </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 :

.panel-refresh {
 height:250px;
 position:relative;
}
 
.refresh-container {
 position:absolute;
 top:0;
 right:0;
 background:rgba(200,200,200,0.25);
 width:100%;
 height:100%;
 display: none;
 text-align:center;
 z-index:4;
}
.refresh-spinner {
 padding: 30px;
 opacity: 0.8;
}

Similar snippets

React js template and ui example News Widget

News Widget

React js template and ui example user blog post widget

user blog post widget

React js template and ui example reminder widget

reminder widget

React js template and ui example Profile page

Profile page

React js template and ui example bs5 dark footer

bs5 dark footer

React js template and ui example Gallery with pagination

Gallery with pagination

React js template and ui example account settings

account settings

React js template and ui example invoice with client info description amount and pay now button

invoice with client info description amount and pay now button