Toggle Sidebar B
AppearanceLight & dark mode D

Bottom Nav

A tab bar for the bottom of a phone screen.

Default

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Usage

vue
<script setup lang="ts">
import { BottomNav, BottomNavItem } from "@/components/ui/bottom-nav";
import { ref } from "vue";

const current = ref("home");
</script>

<template>
  <BottomNav v-model="current">
    <BottomNavItem value="home" label="Home" icon="solar:home-linear" active-icon="solar:home-bold" />
    <BottomNavItem value="explore" label="Explore" icon="solar:compass-linear" active-icon="solar:compass-bold" />
    <BottomNavItem value="profile" label="Profile" icon="solar:user-circle-linear" active-icon="solar:user-circle-bold" />
  </BottomNav>
</template>

Three items

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Four items

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Five items

Keep labels to one short word. A longer label gets cut off.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Icon only

Set labelDisplay to none. Screen readers still get the label.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Variants

Default is frosted, solid is opaque, floating sits above the bottom edge, and glass is a clear capsule.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Floating

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Scroll the screen

Glass

A clear capsule over the content, with a solid pill behind the active item. Use it with indicator set to pill.

Dark previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Glass with labels

With labels under the icons, the pill covers the icon and its label.

Dark previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Glass with active label

Set labelPlacement to beside and labelDisplay to active. The pill grows to fit the label.

Dark previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Glass with an action

Keep the action button outside BottomNav, next to the bar.

Dark previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Dark mode

Every preview has a light and dark switch next to the replay button. This one opens in dark.

Light previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Indicators

Pill and bar slide to the item you tap.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Sizes

Small is 48px tall. Medium is 56px and the default.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Badge

Pass a number for a count or true for a dot.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Avatar

Put an avatar in the icon slot. The slot gets active, so the avatar can dim while another tab is selected.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Controlled

Give each item a value and bind v-model.

Dark previewReplay preview

Home

v-model is "home"

Hide on scroll

Set hideOnScroll to hide the bar when you scroll down. It comes back when you scroll up.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Scroll the screen

Scroll to top

Tap the active item to scroll back to the top. A fixed bar scrolls the page. In a container, set scrollTarget.

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Scroll down, then tap the active tab

Positioning

The bar is fixed by default and hides from lg up. Use absolute inside a container, or static to keep it in the page flow.

The bar adds the bottom safe area under its 56px. Set --safe-area-inset-bottom on a parent to use your own value.

vue
<!-- Pinned to the viewport on phones, hidden from lg up -->
<BottomNav v-model="current">...</BottomNav>

<!-- Inside a container that sets its own safe area -->
<div class="relative h-dvh overflow-hidden [--safe-area-inset-bottom:1.25rem]">
  <BottomNav v-model="current" position="absolute">...</BottomNav>
</div>

App examples

Bars from app designs, built with BottomNav and Tailwind classes. Icons are Solar by 480 Design, licensed under CC BY 4.0.

Meditation app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Workout app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Finance app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Video app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Crypto app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Marketplace app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Walking app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Email app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Banking app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Social app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Profile app

Dark previewReplay preview

@Michael.Anderson

38

Posts

4.2K

followers

1,6K

following

Michael Anderson

Product designer who focus on simplicity usability

Coffee app

Dark previewReplay preview
Your story
Liam Parker
Ava Collins
Noah Reed
Sophia Bennett

Aleya James

Suggested for you

Liam Parker

Lisbon, Portugal

Ava Collins

Suggested for you

Coffee machine app

Light previewReplay preview

Mono Brew Ready

90°C

Water

850ml

Beans

225g

API Reference

BottomNav

PropTypeDefaultDescription
modelValuestring | number-Value of the active item. Use with v-model.
variant"default" | "solid" | "floating" | "glass""default"Surface style. glass is a clear floating capsule, made for indicator pill.
indicator"none" | "pill" | "bar" | "dot""none"Marks the active item. Pill and bar slide between items.
size"sm" | "md""md"Bar height: 48px or 56px.
labelDisplay"always" | "active" | "none""always"Which labels to show.
labelPlacement"below" | "beside""below"Label under or next to the icon. With beside, items grow to fit their label.
position"fixed" | "absolute" | "static""fixed"fixed hides the bar from lg up.
hideOnScrollbooleanfalseHides the bar on scroll down and shows it on scroll up.
scrollTargetHTMLElement | string | nullnullElement or selector for hideOnScroll and scroll to top. Without it, hideOnScroll watches the window and only a fixed bar scrolls to the top.
ariaLabelstring"Bottom navigation"Name of the nav landmark.
classstring-Extra classes, merged with cn().
EventDescription
update:modelValueFires when you tap an item that has a value.
SlotDescription
defaultBottomNavItem children.

BottomNavItem

PropTypeDefaultDescription
tostring-Renders a NuxtLink. External URLs open in a new tab.
iconstring-Iconify icon name.
activeIconstring-Icon for the active state, usually the filled version. The item then keeps one color in every state.
labelstring-Item label.
badgenumber | boolean-A number shows a count, capped at 99+. true shows a dot.
exactbooleanfalseMatch the route exactly instead of by prefix.
activebooleanfalseForces the active state.
valuestring | number-Matches the modelValue of the parent BottomNav.
asstring"button"Element to render when to is not set.
classstring-Extra classes, merged with cn().
EventDescription
selectFires on click.
SlotDescription
iconCustom icon content, such as an avatar. Gets { active }.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
TabMoves focus between items.
EnterOpens the focused item.
SpaceOpens the focused item.
  • Renders a nav landmark named by ariaLabel.
  • The active item has aria-current=page.
  • Icon-only items use their label as aria-label.
  • A count badge is read with the label, for example Inbox, 3.
  • Motion turns off when the user prefers reduced motion.