How to build a simple off-canvas panel in React

Niall McKenna
Dev Genius
Published in
3 min readMay 28, 2023

--

Photo by Tom Smith on Unsplash

On my last few React projects I’ve had a need for a simple off-canvas panel. One was for the mobile menu on my portfolio site and another was for a web app I was building in my day job with a London local authority. The functionality for these panels in both projects were pretty simple. For the mobile navigation, the panel would open and appear on-canvas when the hamburger menu was clicked and would close…

--

--

Front End Engineer in London. I love tech and design and I have been designing and building for the web since 2003. You can find me @ nmk.dev