![cover image for post - Build dynamic navs with current_page? (and conditional classes)](/_next/image?url=%2Fstatic%2Fimages%2Frails-dynamic-nav-current-page%2Fcover.png&w=828&q=75)
This article explores a dynamic nav component I built using the current_page? helper method, plus Rails' conditional class helpers. The result? A simple, dynamic navbar component, with different styling based on current page. Plus I threw in the ViewComponent version too 😉