Is there a way to build responsive navigation using build in navigation component in Sitecore SXA?
I tried to apply navigation-mobile
class, but it doesn't adapt the mobile layout.
Thanks in advance.
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityIs there a way to build responsive navigation using build in navigation component in Sitecore SXA?
I tried to apply navigation-mobile
class, but it doesn't adapt the mobile layout.
Thanks in advance.
A quick way is to use the Toggle component.
navigation-mobile
class in the toggle's placeholder.Of course this isn't optimized and may not even look close to what you need but it is a responsive mobile nav.
If you want another solution, you can take a look at my blog post.
For navigation component to work, you need to create that page under Home item, using Page data template. After that, add navigation component in your page and select the style as horizontal/vertical/sidebar
.