React js UI example. bs4 card widget with user role

React js UI example and template, bs4 card widget with user role! . 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: cards

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">
    <div class="row">
        <div class="col-md-6">
            <div class="card widget-user">
                <div class="card-body">
                    <img src="https://bootdey.com/img/Content/avatar/avatar1.png" class="img-fluid d-block rounded-circle avatar-md" alt="user"/>
                    <div class="wid-u-info">
                        <h5 class="mt-3 mb-1">Chadengle</h5>
                        <p class="text-muted mb-0">[email protected]</p>
                        <div class="user-position">
                            <span class="text-warning">Admin</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    
        <div class="col-md-6">
            <div class="card widget-user">
                <div class="card-body">
                    <img src="https://bootdey.com/img/Content/avatar/avatar6.png" class="img-fluid d-block rounded-circle avatar-md" alt="user"/>
                    <div class="wid-u-info">
                        <h5 class="mt-3 mb-1">Michael Zenaty</h5>
                        <p class="text-muted mb-0">[email protected]</p>
                        <div class="user-position">
                            <span class="text-info">Customer</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-6">
            <div class="card widget-user">
                <div class="card-body">
                    <img src="https://bootdey.com/img/Content/avatar/avatar7.png" class="img-fluid d-block rounded-circle avatar-md" alt="user"/>
                    <div class="wid-u-info">
                        <h5 class="mt-3 mb-1">Michael Zenaty</h5>
                        <p class="text-muted mb-0">[email protected]</p>
                        <div class="user-position">
                            <span class="text-danger">User</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-6">
            <div class="card widget-user">
                <div class="card-body">
                    <img src="https://bootdey.com/img/Content/avatar/avatar2.png" class="img-fluid d-block rounded-circle avatar-md" alt="user"/>
                    <div class="wid-u-info">
                        <h5 class="mt-3 mb-1">Michael Zenaty</h5>
                        <p class="text-muted mb-0">[email protected]</p>
                        <div class="user-position">
                            <span class="text-success">User</span>
                        </div>
                    </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 :

body{
    margin-top:20px;
    background:#DCDCDC;
}
.user-position {
    position: absolute;
    top: 0;
    border-left: 1px solid #dee2e6;
    bottom: 0;
    width: 44px;
    font-size: 16px;
    text-align: center;
    right: 0;
    left: auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row
}

.user-position span {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg)
}

.avatar-md {
    height: 3.5rem;
    width: 3.5rem;
}

Similar snippets

React js template and ui example bs4 user cards with overlay

bs4 user cards with overlay

React js template and ui example bs4 card widget

bs4 card widget

React js template and ui example bs4 seller cards

bs4 seller cards

React js template and ui example team cards with dark hover and icons

team cards with dark hover and icons

React js template and ui example bs5 dark footer

bs5 dark footer

React js template and ui example chat app

chat app

React js template and ui example user profile bio graph and total sales

user profile bio graph and total sales

React js template and ui example General Search Results

General Search Results