React js UI example. image post gallery like facebook

React js UI example and template, image post gallery like facebook! . 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: gallery

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 profile mb-4">
    <div class="profile-img-list">
        <div class="profile-img-list-item main"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/6495ED/000000)*/}}></span></a></div>
        <div class="profile-img-list-item main"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/5F9EA0/000000)*/}}></span></a></div>
        <div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/FF7F50/000000)*/}}></span></a></div>
        <div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/DC143C/000000)*/}}></span></a></div>
        <div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/FFB6C1/000000)*/}}></span></a></div>
        <div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/00008B/000000)*/}}></span></a></div>
    </div>
</div>
<br/>
<div class="container profile">
    <div class="profile-img-list">
		<div class="profile-img-list-item main"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/FFB6C1/000000)*/}}></span></a></div>
		<div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/9932CC/000000)*/}}></span></a></div>
		<div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/00CED1/000000)*/}}></span></a></div>
		<div class="profile-img-list-item"><a href="#/" class="profile-img-list-link"><span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/1E90FF/000000)*/}}></span></a></div>
		<div class="profile-img-list-item with-number">
			<a href="#/" class="profile-img-list-link">
				<span class="profile-img-content" style={{/*background-image: url(https://www.bootdey.com/image/350x280/1E90FF/000000)*/}}></span>
				<div class="profile-img-number">+12</div>
			</a>
		</div>
	</div>
</div>
		</div>
	);
}
export default App;

4. Now we need to add below code into our my-awesome-project/src/App.css file :


.profile {
margin-top:20px;
margin-bottom:60px;
}
.profile .profile-img-list {
    list-style-type: none;
    margin: -0.0625rem -1.3125rem;
    padding: 0;
}
.profile .profile-img-list:after,
.profile .profile-img-list:before {
    content: "";
    display: table;
    clear: both;
}
.profile .profile-img-list .profile-img-list-item {
    float: left;
    width: 25%;
    padding: 0.0625rem;
}
.profile .profile-img-list .profile-img-list-item.main {
    width: 50%;
}
.profile .profile-img-list .profile-img-list-item .profile-img-list-link {
    display: block;
    padding-top: 75%;
    overflow: hidden;
    position: relative;
}
.profile .profile-img-list .profile-img-list-item .profile-img-list-link .profile-img-content,
.profile .profile-img-list .profile-img-list-item .profile-img-list-link img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.profile .profile-img-list .profile-img-list-item .profile-img-list-link .profile-img-content:before,
.profile .profile-img-list .profile-img-list-item .profile-img-list-link img:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(60, 78, 113, 0.15);
}
.profile .profile-img-list .profile-img-list-item.with-number .profile-img-number {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    color: #fff;
    font-size: 1.625rem;
    font-weight: 500;
    line-height: 1.625rem;
    margin-top: -0.8125rem;
    text-align: center;
}

Similar snippets

React js template and ui example image gellery

image gellery

React js template and ui example gallery with small images

gallery with small images

React js template and ui example collage gallery

collage gallery

React js template and ui example bs4 beta gallery

bs4 beta gallery

React js template and ui example bs5 dark footer

bs5 dark footer

React js template and ui example file manager with folders recent files and members

file manager with folders recent files and members

React js template and ui example shopping cart with selected products order summary and checkout button

shopping cart with selected products order summary and checkout button

React js template and ui example Social post

Social post