Topic: can elements of MDBSideNav appear outside the MDBSideNav?

Jens Krieg priority asked 2 years ago


Hi, i'd like to make an hover effect that shows the name of the links that are in the MDB SideBar outside the MDBSideNav as it is in slim Mode. There is a way to let them appears outside it?

i leave to screen shot with the effect i'd liked and what i see now

enter image description here

enter image description here


Krzysztof Wilk staff answered 2 years ago


Hi!

You can use the MDBTooltip component and pass an MDBSideNavItem to it as a tag property. So the result should look like the below:

      <MDBTooltip tag={MDBSideNavItem} title="Category 1" placement="right">
        <MDBSideNavLink
          icon="angle-down"
          shouldBeExpanded={slimCollapse1}
          onClick={() => setSlimCollapse1(!slimCollapse1)}
        >
          <MDBIcon fas icon="grin" className="fa-fw me-3" />
          <span className="sidenav-non-slim">Category 1</span>
        </MDBSideNavLink>
        <MDBSideNavCollapse show={slimCollapse1}>
          <MDBSideNavLink>Link 2</MDBSideNavLink>
          <MDBSideNavLink>Link 3</MDBSideNavLink>
        </MDBSideNavCollapse>
      </MDBTooltip>


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 5.0.0
  • Device: hp
  • Browser: chrome
  • OS: ubuntu
  • Provided sample code: No
  • Provided link: No