# <bottom-nav-item>

One item of a bottom navigation bar: an icon and label that load a page or run a statement.

Category: Navigation.

```ham
<screen>
    <main>
        <column style="w-full p-16 gap-8">
            <text style="font-bold">Home</text>
            <text style="muted">Three new books on your shelf.</text>
        </column>
    </main>
    <bottom-navigation-bar selected_color="teal">
        <bottom-nav-item label="Home"
                         icon="home"
                         selected="true"
                         action="$tab = 'home'"/>
        <bottom-nav-item label="Shelf"
                         icon="book"
                         badge="3"
                         action="$tab = 'shelf'"/>
        <bottom-nav-item label="Profile"
                         icon="person"
                         action="$tab = 'me'"/>
    </bottom-navigation-bar>
</screen>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/bottom-nav-item-light.webp), [dark](https://hypeapps.dev/img/tags/bottom-nav-item-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `active-icon` (also `active_icon`) | Symbol shown while the item is selected (an outline/filled pair that is not one symbol's fill axis). |  |
| `active-label-format` | Label shown while selected; %s is replaced by the label. |  |
| `badge` | Count pill on the icon; hidden when empty, 0 or false. Interpolates, so badge="$db.loan.loans" stays live. |  |
| `badge-color` (also `badge_color`) | Badge pill color (default red). |  |
| `font_size` | Label font size | `12.0` |
| `font_weight` | Label font weight (normal, bold) | `normal` |
| `icon` | Icon name (supports active: prefix modifier) | `help` |
| `icon-image` | Image used as the icon instead of a Material Symbol. |  |
| `icon-tint` | false keeps icon-image's own colors instead of tinting it. | `true` |
| `icon_size` | Icon size | `24.0` |
| `indicator-color` | This item's pill color, over the bar's indicator-color. |  |
| `label` | Tab label |  |
| `label-style` | Style tokens for the label text. |  |
| `labels` | Per-item override of the bar's labels=. (all, selected, none) |  |
| `lift` | How far a raised item's circle rises above the bar's top edge, exactly, in pt (the notch deepens with it). | `20` |
| `overflow` | Text overflow behavior (fade, ellipsis, clip) | `fade` |
| `pad_h` | Horizontal padding | `8.0` |
| `pad_v` | Vertical padding | `6.0` |
| `raised` | A lifted, filled circle: the center action item. The bar grows by lift and the strip above other items lets taps through. |  |
| `raised-color` | Fill of the raised circle (default the bar's selected_color). |  |
| `raised-icon-color` | Icon color on the raised circle. | `white` |
| `raised-size` | Diameter of the raised circle. | `56` |
| `raised-style` (also `raised_style`) | Style tokens for the raised circle (gradient-*, bg-*, border-*, shadow-*); it stays round and sized by raised-size. |  |
| `selected` | Initially selected tab | `false` |
| `selected_color` | Selected state color | `inherit` |
| `unselected_color` | Unselected state color | `inherit` |

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Guides and recipes that use it

- [Navigation](https://hypeapps.dev/docs/guides/navigation.md)

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<bottom-navigation-bar>`](https://hypeapps.dev/docs/reference/bottom-navigation-bar.md): The tab bar along the bottom of a screen; each item swaps a page into the main area.
- [`<nav-item>`](https://hypeapps.dev/docs/reference/nav-item.md): The older spelling of a bottom navigation item: metadata the bar reads, not drawn by itself.
- [`<navigation-rail>`](https://hypeapps.dev/docs/reference/navigation-rail.md): A vertical bar of destinations down the side of the screen, each with its own content panel.
- [`<portal>`](https://hypeapps.dev/docs/reference/portal.md): A live window onto another page: blurred and dimmed under a glass rim, it opens to full screen on a tap.
- [`<rail-item>`](https://hypeapps.dev/docs/reference/rail-item.md): One destination in a navigation rail: an icon, a label and the content shown when it is picked.
- [`<tab>`](https://hypeapps.dev/docs/reference/tab.md): One pane of a tab bar: a label or icon in the bar, and content built the first time it is shown.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
