<rail-item>
One destination in a navigation rail: an icon, a label and the content shown when it is picked.
<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>
Attributes
| Name | What it does | Default |
|---|---|---|
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.