ki-mobile-nav
@kimen/elements/ki-mobile-nav- Source
- Agent reference
Use MobileNav for the main destinations of a phone layout. Use buttons for actions. Switch to the app’s TopNav or Sidebar at the same breakpoint you use for the wider layout. For more than five destinations, use a navigation pattern with room for the full set.
App shell
Place one bar after the content in the app shell. Its host reserves the bar’s
height and bottom inset so the last content can scroll clear. The default
fixed variant spans the bottom edge. Set variant="floating" for an inset
raised bar. Both variants account for the bottom safe area. Use
viewport-fit=cover in the page’s viewport metadata when drawing edge to edge.
Register the icons used by each destination.
import '@kimen/elements/icons/house';import '@kimen/elements/icons/search';import '@kimen/elements/icons/inbox';<main><!-- App content --></main><ki-mobile-nav label="Main" variant="floating"><ki-mobile-nav-item href="/" icon-name="house" current>Home</ki-mobile-nav-item><ki-mobile-nav-item href="/search" icon-name="search">Search</ki-mobile-nav-item><ki-mobile-nav-item href="/inbox" icon-name="inbox" count="3">Inbox</ki-mobile-nav-item></ki-mobile-nav>Accessibility
Use a unique landmark label when several navigation landmarks appear on the
page. Keep each destination’s text short and visible, and update current as
the route changes. Each item is a native link in the Tab order. When the browser
reports or exposes the software keyboard through viewport geometry, the bar
temporarily hides.
API reference
When to use: Place after the main content of a narrow layout. Supply three to five direct ki-mobile-nav-item children and mark the current page on its item. The host reserves room for the bar in normal flow.
When not to use: Use buttons for actions. Use TopNav or Sidebar on wide layouts or when there are more than five destinations.
Properties & attributes
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
label | label | string | 'Main' | Accessible name of the landmark. Supply a distinct name when the page has more than one navigation landmark. |
variant | variant | "fixed" | "floating" | 'fixed' | Place the bar edge to edge or inset it as a raised pill. |
Slots
| Slot | Description |
|---|---|
| (default) | Three to five direct ki-mobile-nav-item destinations. |
CSS parts
| Part | Description |
|---|---|
bar | The native navigation landmark and painted bar. |
CSS custom properties
The public styling contract of ki-mobile-nav: reassign these tokens at :root or on a subtree — never override internals.
| Token | Description |
|---|---|
--ki-mobile-nav-backdrop-filter | Complete optional backdrop filter for either bar variant. |
--ki-mobile-nav-bg | Fixed bar surface. |
--ki-mobile-nav-bg-image | Optional decorative image for either bar variant. |
--ki-mobile-nav-border | Stroke along the fixed bar or around the floating bar. |
--ki-mobile-nav-border-width | Bar border width. |
--ki-mobile-nav-floating-bg | Floating bar surface. |
--ki-mobile-nav-floating-inset | Space beside and below the floating bar. |
--ki-mobile-nav-floating-padding | Inline padding inside the floating bar. |
--ki-mobile-nav-floating-radius | Floating bar pill shape. |
--ki-mobile-nav-floating-shadow | Elevation of the floating bar. |
--ki-mobile-nav-font-family | Typeface for the bar and its destination labels. |
--ki-mobile-nav-height | Minimum height before the safe area and border are added. |
--ki-mobile-nav-item-target-min | Minimum block and inline link target size. |