Bottom Navigation

Bottom Navigation is typically used in mobile-friendly applications to provide the user with quick access to the most important parts of the app.

Basic Bottom Nav

A basic bottom navigation has multiple sections with icons. Typically only one section is set to active at a time.

Tip
We have to add the relative class to ensure that it shows up in our example rather than the default of being fixed to the bottom of the screen.
Preview
Code
= daisy_bottom_nav(css: "relative border border-base-200") do |nav|
  - nav.with_section(icon: "home", href: "#")
  - nav.with_section(icon: "information-circle", href: "#", active: true)
  - nav.with_section(icon: "chart-bar", href: "#")

Custom Nav with Titles

The Bottom Nav sections can also have a simple title passed via the title attribute, or a more complex title by passing a block to the section.

Preview
Code
= daisy_bottom_nav(css: "relative border border-base-200") do |nav|
  - nav.with_section(icon: "home", href: "#", title: "Home")
  - nav.with_section(icon: "information-circle", icon_css: "text-blue-600 -rotate-45", href: "#", active: true, title: "Info")
  - nav.with_section(icon: "chart-bar", href: "#") do
    .font-bold.italic.text-xs.text-red-600.animate-bounce
      Stats

Colored Bottom Nav

You can also use any of the built-in Daisy, Tailwind, or custom colors.

Preview
Code
- colors = ["text-primary", "text-secondary", "text-accent", "text-info", "text-success", "text-warning", "text-error", "text-cyan-400", "text-[#449944]"]
- colors.each_with_index do |color, index|
  = daisy_bottom_nav(css: "relative border border-base-200") do |nav|
    - nav.with_section(icon: "home", href: "#", active: index % 3 == 0, css: color)
    - nav.with_section(icon: "information-circle", href: "#", active: index % 3 == 1, css: color)
    - nav.with_section(icon: "chart-bar", href: "#", active: index % 3 == 2, css: color)
Made with by Profoundry .
Copyright © 2023-2025 Profoundry LLC.
All rights reserved.