# `PhiaUi.Components.NavRail`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phia_ui/components/navigation/nav_rail.ex#L1)

Material Design 3-style icon-strip sidebar navigation rail.

Two components:

- `nav_rail/1` — the rail container (fixed or inline, collapsible)
- `nav_rail_item/1` — individual item with icon, label tooltip, and optional badge

# `nav_rail`

Renders a Material Design 3-style navigation rail.
## Attributes

* `id` (`:string`) - Defaults to `"nav-rail"`.
* `expanded` (`:boolean`) - When true, shows labels inline (w-36 vs w-14). Defaults to `false`.
* `position` (`:atom`) - Defaults to `:left`. Must be one of `:left`, `:right`, or `:inline`.
* `variant` (`:atom`) - Defaults to `:default`. Must be one of `:default`, `:surface`, or `:bordered`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `header` - Logo/brand area at top.
* `inner_block` (required) - nav_rail_item children.
* `footer` - Settings/user area at bottom.

# `nav_rail_item`

Renders an individual navigation rail item.
## Attributes

* `href` (`:string`) - Defaults to `nil`.
* `on_click` (`:string`) - phx-click event when no href. Defaults to `nil`.
* `active` (`:boolean`) - Defaults to `false`.
* `disabled` (`:boolean`) - Defaults to `false`.
* `label` (`:string`) (required) - Tooltip text (collapsed) or inline label (expanded).
* `badge` (`:any`) - Badge count — integer or string. Defaults to `nil`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `icon` (required) - <.icon> element.
* `indicator` - Optional custom active indicator.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
