menuMDUIDocs
color_lens
The new mdui 2 based on Material Design 3 and Web Components is now available. Check out the mdui 2 documentation.

Slider

Bottom navigation bars are fixed at the bottom of the page and can have 3 to 5 options. They are typically used only on mobile phones. Each page can have only one bottom navigation bar.

Usage

Only HTML is needed for it to take effect.

Material Design Guidelines: Components - Bottom navigation

Basic style

Related Reading

Icon only

Style

Text only

Example
<label class="mdui-slider">
  <input type="range" step="0.1" min="0" max="100"/>
</label>

Only show text on active

Example
<label class="mdui-slider mdui-slider-discrete">
  <input type="range" step="1" min="0" max="100"/>
</label>

Background color

Auto-hide

The following example shows both icon and text, typically used when there are only 3 navigation items.

Example
<!-- Navigation items with class <code>.mdui-bottom-nav-active</code> will be active by default. -->
<label class="mdui-slider">
  <input type="range" step="0.1" min="0" max="100" value="0" disabled/>
</label>

<!-- Add class <code>.mdui-bottom-nav-text-auto</code> to the <code>&lt;div class=&quot;mdui-bottom-nav&quot;&gt;&lt;/div&gt;</code> element to achieve this effect. -->
<label class="mdui-slider">
  <input type="range" step="0.1" min="0" max="100" value="50" disabled/>
</label>

Usually used when there are 4 to 5 navigation items. Only icons are shown by default, and text is shown after the navigation item is active.

Example
<!-- Navigation items with class <code>.mdui-bottom-nav-active</code> will be active by default. -->
<label class="mdui-slider mdui-slider-discrete">
  <input type="range" step="1" min="0" max="100" value="0" disabled/>
</label>

<!-- Add class <code>.mdui-bottom-nav-text-auto</code> to the <code>&lt;div class=&quot;mdui-bottom-nav&quot;&gt;&lt;/div&gt;</code> element to achieve this effect. -->
<label class="mdui-slider mdui-slider-discrete">
  <input type="range" step="1" min="0" max="100" value="50" disabled/>
</label>

Fixed to bottom

Add the class .mdui-color-[color] to the <div class="mdui-bottom-nav"></div> element to give the bottom navigation bar a background color.

Add the class .mdui-bottom-nav-fixed to the body element to fix the bottom navigation bar at the bottom of the page, so it doesn't scroll with the scrollbar.

CSS Classes

Class NameDescription
.mdui-sliderThis class should be added to the <code>body</code> element, not the <code>.mdui-bottom-nav</code> element, because in addition to fixing the bottom navigation bar, it also adds <code>padding-bottom</code> to the <code>body</code> so the bottom navigation bar doesn't cover page content.
.mdui-slider-discreteAdd the class <code>.mdui-bottom-nav-scroll-hide</code> to hide the bottom navigation bar when scrolling down and show it when scrolling up.