Hamburger Menu

React Bootstrap 5 Hamburger Menu

Responsive React Hamburger button menu with Bootstrap 5. Hamburger toggle menu for mobile navigation, icon animations, sidenav, navbar templates & more.

Hamburger menu is a navigation type that serves the purpose of hiding some menu items & showing them on click. It stacks the items on top of each other in a "hamburger" fashion.


Basic example

Simple example of a hamburger menu in a navbar.

        
            
            import React, { useState } from 'react';
            import {
              MDBContainer,
              MDBCollapse,
              MDBNavbar,
              MDBNavbarToggler,
              MDBIcon,
              MDBBtn,
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [showNavExternal, setShowNavExternal] = useState(false);

              return (
                <>
                  <MDBNavbar>
                    <MDBContainer fluid>
                      <MDBNavbarToggler
                        type='button'
                        data-target='#navbarToggleExternalContent'
                        aria-controls='navbarToggleExternalContent'
                        aria-expanded='false'
                        aria-label='Toggle navigation'
                        onClick={() => setShowNavExternal(!showNavExternal)}
                      >
                        <MDBIcon icon='bars' fas />
                      </MDBNavbarToggler>
                    </MDBContainer>
                  </MDBNavbar>
      
                  <MDBCollapse show={showNavExternal}>
                    <div className='bg-light shadow-3 p-4'>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 1
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                    </div>
                  </MDBCollapse>
                </>
              );
            }
            
        
    

Hamburger in Navbar

Explore advanced navbar options & customization in the Navbar Documentation.

Start

By default this hamburger menu will be displayed on the left side of a navbar.

MDB supports right-to-left so you can easily reverse text direction as well as this display of the navbar icon.

So this elemnt will have the hamburger menu at the start of a navbar - on left or right side depending on the text direction.

        
            
            import React, { useState } from 'react';
            import {
              MDBContainer,
              MDBCollapse,
              MDBNavbar,
              MDBNavbarToggler,
              MDBIcon,
              MDBBtn,
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [showNavExternal2, setShowNavExternal2] = useState(false);
              
              return (
                <>
                  <MDBNavbar>
                    <MDBContainer fluid>
                      <MDBNavbarToggler
                        type='button'
                        data-target='#navbarToggleExternalContent'
                        aria-controls='navbarToggleExternalContent'
                        aria-expanded='false'
                        aria-label='Toggle navigation'
                        onClick={() => setShowNavExternal2(!showNavExternal2)}
                      >
                        <MDBIcon icon='bars' fas />
                      </MDBNavbarToggler>
                    </MDBContainer>
                  </MDBNavbar>
    
                  <MDBCollapse show={showNavExternal2}>
                    <div className='bg-light shadow-3 p-4'>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 1
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                    </div>
                  </MDBCollapse>
                </>
              );
            }
            
        
    

End

By default this hamburger menu will be displayed on the right side of a navbar.

You can easily push an element to the end of its parent by using the .ms-auto> class which stands for margin start: auto.

Thanks to this approach this example also supports RTL text direction (so with RTL enabled it will display on the left side).

        
            
            import React, { useState } from 'react';
            import {
              MDBContainer,
              MDBCollapse,
              MDBNavbar,
              MDBNavbarToggler,
              MDBIcon,
              MDBBtn,
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [showNavExternal3, setShowNavExternal3] = useState(false);
              
              return (
                <>
                  <MDBNavbar>
                    <MDBContainer fluid>
                      <MDBNavbarToggler
                        className='ms-auto'
                        type='button'
                        data-target='#navbarToggleExternalContent'
                        aria-controls='navbarToggleExternalContent'
                        aria-expanded='false'
                        aria-label='Toggle navigation'
                        onClick={() => setShowNavExternal3(!showNavExternal3)}
                      >
                        <MDBIcon icon='bars' fas />
                      </MDBNavbarToggler>
                    </MDBContainer>
                  </MDBNavbar>
    
                  <MDBCollapse show={showNavExternal3}>
                    <div className='bg-light shadow-3 p-4'>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 1
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                      <MDBBtn block className='border-bottom m-0' color='link'>
                        Link 2
                      </MDBBtn>
                    </div>
                  </MDBCollapse>
                </>
              );
            }
            
        
    

Hamburger in Sidenav

Hamburger Button is a common way to toggle sidenav on mobile devices.

You can learn more about the sidebar component in the Side Navigation Documentation.

Start

Simple example of a sidebar hamburger menu with the side navigation element at the start of the viewport (on the left side by default).

        
            
            import React, { useState } from 'react';
            import {
              MDBIcon,
              MDBBtn,
              MDBSideNav,
              MDBSideNavItem,
              MDBSideNavLink,
              MDBSideNavMenu,
              MDBSideNavCollapse
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [basicOpen, setBasicOpen] = useState(true);
              const [basicCollapse1, setBasicCollapse1] = useState(true);
              const [basicCollapse2, setBasicCollapse2] = useState(false);
              
              return (
                <>
                  <MDBSideNav isOpen={basicOpen} absolute getOpenState={(e: any) => setBasicOpen(e)}>
                    <MDBSideNavMenu>
                      <MDBSideNavItem>
                        <MDBSideNavLink>
                          <MDBIcon far icon='smile' className='fa-fw me-3' />
                          <span className='sidenav-non-slim'>Link 1</span>
                        </MDBSideNavLink>
                      </MDBSideNavItem>
                      <MDBSideNavItem>
                        <MDBSideNavLink
                          icon='angle-down'
                          shouldBeExpanded={basicCollapse1}
                          onClick={() => setBasicCollapse1(!basicCollapse1)}
                        >
                          <MDBIcon fas icon='grin' className='fa-fw me-3' />
                          <span className='sidenav-non-slim'>Category 1</span>
                        </MDBSideNavLink>
                        <MDBSideNavCollapse show={basicCollapse1}>
                          <MDBSideNavLink>Link 2</MDBSideNavLink>
                          <MDBSideNavLink>Link 3</MDBSideNavLink>
                        </MDBSideNavCollapse>
                      </MDBSideNavItem>
                      <MDBSideNavItem>
                        <MDBSideNavLink
                          icon='angle-down'
                          shouldBeExpanded={basicCollapse2}
                          onClick={() => setBasicCollapse2(!basicCollapse2)}
                        >
                          <MDBIcon fas icon='grin' className='fa-fw me-3' />
                          Category 2
                        </MDBSideNavLink>
                        <MDBSideNavCollapse show={basicCollapse2}>
                          <MDBSideNavLink>Link 4</MDBSideNavLink>
                          <MDBSideNavLink>Link 5</MDBSideNavLink>
                        </MDBSideNavCollapse>
                      </MDBSideNavItem>
                    </MDBSideNavMenu>
                  </MDBSideNav>
    
                  <div style={{ padding: '20px' }} className='text-center'>
                    <MDBBtn onClick={() => setBasicOpen(!basicOpen)}>
                      <MDBIcon fas icon='bars' />
                    </MDBBtn>
                  </div>
                </>
              );
            }
            
        
    

End

Simple example of a sidebar hamburger menu with the side navigation element at the end of the viewport (on the left side by default).

Place the navigation on the other side by setting the right attribute to true.

        
            
            import React, { useState } from 'react';
            import {
              MDBIcon,
              MDBBtn,
              MDBSideNav,
              MDBSideNavItem,
              MDBSideNavLink,
              MDBSideNavMenu,
              MDBSideNavCollapse
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [rightOpen, setRightOpen] = useState(true);
              const [rightCollapse1, setRightCollapse1] = useState(true);
              const [rightCollapse2, setRightCollapse2] = useState(false);
              
              return (
                <>
                  <MDBSideNav right isOpen={rightOpen} absolute getOpenState={(e: any) => setRightOpen(e)}>
                    <MDBSideNavMenu>
                      <MDBSideNavItem>
                        <MDBSideNavLink>
                          <MDBIcon far icon='smile' className='fa-fw me-3' />
                          <span className='sidenav-non-slim'>Link 1</span>
                        </MDBSideNavLink>
                      </MDBSideNavItem>
                      <MDBSideNavItem>
                        <MDBSideNavLink
                          icon='angle-down'
                          shouldBeExpanded={rightCollapse1}
                          onClick={() => setRightCollapse1(!rightCollapse1)}
                        >
                          <MDBIcon fas icon='grin' className='fa-fw me-3' />
                          <span className='sidenav-non-slim'>Category 1</span>
                        </MDBSideNavLink>
                        <MDBSideNavCollapse show={rightCollapse1}>
                          <MDBSideNavLink>Link 2</MDBSideNavLink>
                          <MDBSideNavLink>Link 3</MDBSideNavLink>
                        </MDBSideNavCollapse>
                      </MDBSideNavItem>
                      <MDBSideNavItem>
                        <MDBSideNavLink
                          icon='angle-down'
                          shouldBeExpanded={rightCollapse2}
                          onClick={() => setRightCollapse2(!rightCollapse2)}
                        >
                          <MDBIcon fas icon='grin' className='fa-fw me-3' />
                          Category 1
                        </MDBSideNavLink>
                        <MDBSideNavCollapse show={rightCollapse2}>
                          <MDBSideNavLink>Link 4</MDBSideNavLink>
                          <MDBSideNavLink>Link 5</MDBSideNavLink>
                        </MDBSideNavCollapse>
                      </MDBSideNavItem>
                    </MDBSideNavMenu>
                  </MDBSideNav>
    
                  <div style={{ padding: '20px' }} className='text-center'>
                    <MDBBtn onClick={() => setRightOpen(!rightOpen)}>
                      <MDBIcon fas icon='bars' />
                    </MDBBtn>
                  </div>
                </>
              );
            }
            
        
    

Hamburger Icons

Examples of icon usage in Bootstrap Hamburger menu.

You will find even more icons in the Icons Documentation.

Custom icons

You can make any icon a hamburger menu toggler.

        
            
            import React, { useState } from 'react';
            import {
              MDBContainer,
              MDBCollapse,
              MDBNavbar,
              MDBNavbarToggler,
              MDBIcon,
              MDBBtn,
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [showCustomIcons, setShowCustomIcons] = useState(false);
              const [showCustomIcons2, setShowCustomIcons2] = useState(false);
              const [showCustomIcons3, setShowCustomIcons3] = useState(false);
              const [showCustomIcons4, setShowCustomIcons4] = useState(false);
              const [showCustomIcons5, setShowCustomIcons5] = useState(false);
              
              return (
                <>
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowCustomIcons(!showCustomIcons)}
                        >
                          <MDBIcon icon='bars' fas />
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showCustomIcons}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowCustomIcons2(!showCustomIcons2)}
                        >
                          <MDBIcon icon='hamburger' fas />
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showCustomIcons2}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowCustomIcons3(!showCustomIcons3)}
                        >
                          <MDBIcon icon='chevron-circle-down' fas />
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showCustomIcons3}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowCustomIcons4(!showCustomIcons4)}
                        >
                          <MDBIcon icon='ellipsis-h' fas />
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showCustomIcons4}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowCustomIcons5(!showCustomIcons5)}
                        >
                          <MDBIcon icon='compass' fas />
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showCustomIcons5}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
                </>
              );
            }
            
        
    

Animated icons

Animated hamburger menu icons add dynamism to your design.

        
            
            import React, { useState } from 'react';
            import {
              MDBContainer,
              MDBCollapse,
              MDBNavbar,
              MDBNavbarToggler,
              MDBIcon,
              MDBBtn,
            } from 'mdb-react-ui-kit';
    
            export default function App() {
              const [showAnimated, setShowAnimated] = useState(false);
              const [showAnimated2, setShowAnimated2] = useState(false);
              const [showAnimated3, setShowAnimated3] = useState(false);
              
              return (
                <>
                  <section className='mb-3'>
                    <MDBNavbar>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          className='first-button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowAnimated(!showAnimated)}
                        >
                          <div className={`animated-icon1 ${showAnimated && 'open'}`}>
                            <span></span>
                            <span></span>
                            <span></span>
                          </div>
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showAnimated}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar dark bgColor='dark'>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          className='second-button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowAnimated2(!showAnimated2)}
                        >
                          <div className={`animated-icon2 ${showAnimated2 && 'open'}`}>
                            <span></span>
                            <span></span>
                            <span></span>
                            <span></span>
                          </div>
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showAnimated2}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
    
                  <section className='mb-3'>
                    <MDBNavbar dark bgColor='info'>
                      <MDBContainer fluid>
                        <MDBNavbarToggler
                          type='button'
                          className='third-button'
                          data-target='#navbarToggleExternalContent'
                          aria-controls='navbarToggleExternalContent'
                          aria-expanded='false'
                          aria-label='Toggle navigation'
                          onClick={() => setShowAnimated3(!showAnimated3)}
                        >
                          <div className={`animated-icon3 ${showAnimated3 && 'open'}`}>
                            <span></span>
                            <span></span>
                            <span></span>
                          </div>
                        </MDBNavbarToggler>
                      </MDBContainer>
                    </MDBNavbar>
    
                    <MDBCollapse show={showAnimated3}>
                      <div className='bg-light shadow-3 p-4'>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 1
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                        <MDBBtn block className='border-bottom m-0' color='link'>
                          Link 2
                        </MDBBtn>
                      </div>
                    </MDBCollapse>
                  </section>
                </>
              );
            }
            
        
    
        
            
              /* Icon 1 */
              .animated-icon1,
              .animated-icon2,
              .animated-icon3 {
                width: 30px;
                height: 20px;
                position: relative;
                margin: 0px;
                -webkit-transform: rotate(0deg);
                -moz-transform: rotate(0deg);
                -o-transform: rotate(0deg);
                transform: rotate(0deg);
                -webkit-transition: .5s ease-in-out;
                -moz-transition: .5s ease-in-out;
                -o-transition: .5s ease-in-out;
                transition: .5s ease-in-out;
                cursor: pointer;
              }

              .animated-icon1 span,
              .animated-icon2 span,
              .animated-icon3 span {
                display: block;
                position: absolute;
                height: 3px;
                width: 100%;
                border-radius: 9px;
                opacity: 1;
                left: 0;
                -webkit-transform: rotate(0deg);
                -moz-transform: rotate(0deg);
                -o-transform: rotate(0deg);
                transform: rotate(0deg);
                -webkit-transition: .25s ease-in-out;
                -moz-transition: .25s ease-in-out;
                -o-transition: .25s ease-in-out;
                transition: .25s ease-in-out;
              }

              .animated-icon1 span {
                background: #2d7ef7;
              }

              .animated-icon2 span {
                background: #e3f2fd;
              }

              .animated-icon3 span {
                background: #f3e5f5;
              }

              .animated-icon1 span:nth-child(1) {
                top: 0px;
              }

              .animated-icon1 span:nth-child(2) {
                top: 10px;
              }

              .animated-icon1 span:nth-child(3) {
                top: 20px;
              }

              .animated-icon1.open span:nth-child(1) {
                top: 11px;
                -webkit-transform: rotate(135deg);
                -moz-transform: rotate(135deg);
                -o-transform: rotate(135deg);
                transform: rotate(135deg);
              }

              .animated-icon1.open span:nth-child(2) {
                opacity: 0;
                left: -60px;
              }

              .animated-icon1.open span:nth-child(3) {
                top: 11px;
                -webkit-transform: rotate(-135deg);
                -moz-transform: rotate(-135deg);
                -o-transform: rotate(-135deg);
                transform: rotate(-135deg);
              }

              /* Icon 3*/

              .animated-icon2 span:nth-child(1) {
                top: 0px;
              }

              .animated-icon2 span:nth-child(2),
              .animated-icon2 span:nth-child(3) {
                top: 10px;
              }

              .animated-icon2 span:nth-child(4) {
                top: 20px;
              }

              .animated-icon2.open span:nth-child(1) {
                top: 11px;
                width: 0%;
                left: 50%;
              }

              .animated-icon2.open span:nth-child(2) {
                -webkit-transform: rotate(45deg);
                -moz-transform: rotate(45deg);
                -o-transform: rotate(45deg);
                transform: rotate(45deg);
              }

              .animated-icon2.open span:nth-child(3) {
                -webkit-transform: rotate(-45deg);
                -moz-transform: rotate(-45deg);
                -o-transform: rotate(-45deg);
                transform: rotate(-45deg);
              }

              .animated-icon2.open span:nth-child(4) {
                top: 11px;
                width: 0%;
                left: 50%;
              }

              /* Icon 4 */

              .animated-icon3 span:nth-child(1) {
                top: 0px;
                -webkit-transform-origin: left center;
                -moz-transform-origin: left center;
                -o-transform-origin: left center;
                transform-origin: left center;
              }

              .animated-icon3 span:nth-child(2) {
                top: 10px;
                -webkit-transform-origin: left center;
                -moz-transform-origin: left center;
                -o-transform-origin: left center;
                transform-origin: left center;
              }

              .animated-icon3 span:nth-child(3) {
                top: 20px;
                -webkit-transform-origin: left center;
                -moz-transform-origin: left center;
                -o-transform-origin: left center;
                transform-origin: left center;
              }

              .animated-icon3.open span:nth-child(1) {
                -webkit-transform: rotate(45deg);
                -moz-transform: rotate(45deg);
                -o-transform: rotate(45deg);
                transform: rotate(45deg);
                top: 0px;
                left: 8px;
              }

              .animated-icon3.open span:nth-child(2) {
                width: 0%;
                opacity: 0;
              }

              .animated-icon3.open span:nth-child(3) {
                -webkit-transform: rotate(-45deg);
                -moz-transform: rotate(-45deg);
                -o-transform: rotate(-45deg);
                transform: rotate(-45deg);
                top: 21px;
                left: 8px;
              }