# <rail-item>

One destination in a navigation rail: an icon, a label and the content shown when it is picked.

Category: Navigation.

```ham
<navigation-rail color="indigo"
                 label-type="all">
    <rail-item icon="inbox"
               label="Inbox">
        <column style="p-16 gap-8">
            <text style="font-bold">Inbox</text>
            <text style="muted">3 unread messages</text>
        </column>
    </rail-item>
    <rail-item icon="star"
               label="Starred">
        <text style="p-16">No starred messages</text>
    </rail-item>
    <rail-item icon="settings"
               label="Settings">
        <text style="p-16">Settings</text>
    </rail-item>
</navigation-rail>
```

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

## Attributes

| Name | What it does | Default |
|---|---|---|
| `icon` | Icon name (supports active: prefix modifier) | `help` |
| `label` | Item label |  |
| `selected` | Initially selected | `false` |

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.

## Related tags

- [`<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.
- [`<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-nav-item>`](https://hypeapps.dev/docs/reference/bottom-nav-item.md): One item of a bottom navigation bar: an icon and label that load a page or run a statement.
- [`<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.
- [`<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.
- [`<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
