1. Reference
  2. Navigation

<rail-item>

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

Navigation
rail-item.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>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
icon Icon name (supports active: prefix modifier)
string
help
label Item label
string
selected Initially selected
boolean
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.

This page is also Markdown, and all of HAM is in llms.txt.