Sub-navigation

The sub-navigation component provides a secondary navigation menu shown within the content of a page.

It dynamically collapses into a mobile-friendly dropdown menu and expands to a clean, navigational helper on larger screens. It includes options to display icons, a back button, and more.

Installation

Copy
rails g instrumental:subnav

To insert a sub-navigation component into a view:

Copy
rails g instrumental:subnav:insert

Customization

Find all of your customization options (via local variables) in these files:

app/views/shared/components/subnav/_subnav.html.erb
app/views/shared/components/subnav/_subnav_item.html.erb

Instrumental Components

I created Instrumental Components to make designing and building professional apps with Ruby on Rails easy, fast, and fun. I use it on all of my projects and I hope it helps you build something great.

Brian Casel
Brian Casel
Creator of Instrumental Components
Learn more Send me a question or request