BottomNavigation component — a fixed bottom tab bar for mobile/PWA apps.
Equivalent to the iOS tab bar or Android bottom navigation bar. Renders
a fixed <nav> at the bottom of the viewport with icon + label items.
Zero JavaScript — all state is managed server-side via LiveView.
Examples
<%!-- With items attr --%>
<.bottom_navigation
active={@current_tab}
items={[
%{label: "Home", icon: "home", href: "/", value: "home"},
%{label: "Search", icon: "search", href: "/search", value: "search"},
%{label: "Messages", icon: "message", href: "/messages", value: "messages", badge_count: @unread},
%{label: "Profile", icon: "user", href: "/profile", value: "profile"}
]}
/>
<%!-- With phx-click (SPA navigation) --%>
<.bottom_navigation
active={@tab}
on_click="switch_tab"
items={[
%{label: "Feed", icon: "home", value: "feed"},
%{label: "Search", icon: "search", value: "search"}
]}
/>
Summary
Functions
Renders a fixed bottom navigation bar.