Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react-bootstrap sidebar

const Sidebar=()=>{
    return (
        <div style={{display:'flex', height:'100%', overflow:'scroll initial'}}>
            <CDBSidebar textColer="#fff" backgroundColor="rgb(37, 90, 122)">
                <CDBSidebarHeader prefix={<i className="fa fa-bars fa-large"></i>}>
                    <Link to="/dashboard">Dashboard</Link>
                </CDBSidebarHeader>
                <CDBSidebarContent className="sidebar-content">
                    <CDBSidebarMenu>
                        <NavLink exact to="/dashboard" activeClassName="activeClicked">
                            <CDBSidebarMenuItem icon="columns">
                                Transfer
                            </CDBSidebarMenuItem>
                        </NavLink>
                        <NavLink exact to="/dashboard" activeClassName="activeClicked">
                            <CDBSidebarMenuItem icon="columns">
                                Transfer
                            </CDBSidebarMenuItem>
                        </NavLink>
                        <NavLink exact to="/dashboard" activeClassName="activeClicked">
                            <CDBSidebarMenuItem icon="columns">
                                Transfer
                            </CDBSidebarMenuItem>
                        </NavLink>
                        <NavLink exact to="/dashboard" activeClassName="activeClicked">
                             <CDBSidebarMenuItem icon="columns">
                                Transfer
                            </CDBSidebarMenuItem>
                        </NavLink>
                    </CDBSidebarMenu>
                </CDBSidebarContent>
                <CDBSidebarFooter style={{textAlign:'center'}}>
                    <div className="sidebar-btn-wrapper" style={{ padding :'20px 5px' }}>
                        sidebar footer
                    </div>
                </CDBSidebarFooter>
            </CDBSidebar>
        </div>
    )
}

export default Sidebar;
Comment

react-bootstrap sidebar menu

1import React from 'react';2import {3  CDBSidebar,4  CDBSidebarContent,5  CDBSidebarFooter,6  CDBSidebarHeader,7  CDBSidebarMenu,8  CDBSidebarMenuItem,9} from 'cdbreact';10import { NavLink } from 'react-router-dom';1112const Sidebar = () => {13  return (14    <div style={{ display: 'flex', height: '100vh', overflow: 'scroll initial' }}>15      <CDBSidebar textColor="#fff" backgroundColor="#333">16        <CDBSidebarHeader prefix={<i className="fa fa-bars fa-large"></i>}>17          <a href="/" className="text-decoration-none" style={{ color: 'inherit' }}>18            Sidebar19          </a>20        </CDBSidebarHeader>2122        <CDBSidebarContent className="sidebar-content">23          <CDBSidebarMenu>24            <NavLink exact to="/" activeClassName="activeClicked">25              <CDBSidebarMenuItem icon="columns">Dashboard</CDBSidebarMenuItem>26            </NavLink>27            <NavLink exact to="/tables" activeClassName="activeClicked">28              <CDBSidebarMenuItem icon="table">Tables</CDBSidebarMenuItem>29            </NavLink>30            <NavLink exact to="/profile" activeClassName="activeClicked">31              <CDBSidebarMenuItem icon="user">Profile page</CDBSidebarMenuItem>32            </NavLink>33            <NavLink exact to="/analytics" activeClassName="activeClicked">34              <CDBSidebarMenuItem icon="chart-line">Analytics</CDBSidebarMenuItem>35            </NavLink>3637            <NavLink exact to="/hero404" target="_blank" activeClassName="activeClicked">38              <CDBSidebarMenuItem icon="exclamation-circle">404 page</CDBSidebarMenuItem>39            </NavLink>40          </CDBSidebarMenu>41        </CDBSidebarContent>4243        <CDBSidebarFooter style={{ textAlign: 'center' }}>44          <div45            style={{46              padding: '20px 5px',47            }}48          >49            Sidebar Footer50          </div>51        </CDBSidebarFooter>52      </CDBSidebar>53    </div>54  );55};5657export default Sidebar;
Comment

PREVIOUS NEXT
Code Example
Javascript :: expect any function jest 
Javascript :: localstorage in js 
Javascript :: react pass variable from child to parent 
Javascript :: js array map 
Javascript :: sending value in input angular material 
Javascript :: javascript write to firebase 
Javascript :: jspdf create table 
Javascript :: react native dimensions 
Javascript :: nodejs watermark image 
Javascript :: isfunction javascript 
Javascript :: sequelize bulk update 
Javascript :: extract content from string html 
Javascript :: remove object from array by value javascript 
Javascript :: how to filter array in javascript 
Javascript :: jquery datepicker on multiple input fields 
Javascript :: vscode react extensions 
Javascript :: google gapi auth2 get current token 
Javascript :: adding a timer in a quiz game 
Javascript :: js int to string base 
Javascript :: change inside div with jquery 
Javascript :: how to access key value pair in javascript 
Javascript :: jquery check is select 
Javascript :: map method in react 
Javascript :: nodejs delete in mysql 
Javascript :: server side rendering in agular 
Javascript :: emoji-picker-react 
Javascript :: remove beginning of base64 javascript 
Javascript :: redux update item in array 
Javascript :: icomoon react native 
Javascript :: jquery data 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =