Dock
The floating bar of your app's top-level screens: the Liquid Glass form of the tab bar. A glass capsule of icon-and-label items at the bottom of the screen, with a separate button beside it, an accessory above it, a minimized form while content scrolls, and a search field across the bottom.
Installation
This also adds Glass, which draws the dock, Icon, whose icons the items draw, and Search Field, which the dock can search with.
Usage
Give each item a route, an icon and a label, and put the dock after a <lynx-tab-outlet>, which keeps each tab as a native tab bar does:
- The dock floats over your screens at the bottom of its parent, and their content scrolls beneath it. It clears the iPhone's home indicator by the bottom safe area.
- A tap navigates to the item's
routewith Angular's ownRouterLink. Set up the router withprovideRouter()from@blotch/angular-lynx. - A capsule marks the selected item, and slides to the next one you tap as you tap it, while the screen it shows is still being built. An item stays selected on the routes under it: Library at
/library/42too. If the navigation ends somewhere else (a guard says no or redirects, or it fails), the item of the route the app is on is selected again. - Going back to a tab finds it as you left it, with
<lynx-tab-outlet>: its scroll positions, the screens pushed in it, and its native views. A tap on the selected item pops its stack to its first screen. With<router-outlet>, each tab is built again every time. - The action is a separate button, for what people reach for from every screen, such as search or compose (below).
Give each screen's host flex-1, so its <scroll-view> fills the screen, and pad the end of its content so the last row scrolls clear of the dock: pb-safe-24, or pb-safe-40 with an accessory.
What each platform draws
Minimize on scroll
Put ui-dock-scroll on a screen's <scroll-view> (or <list>), and the dock minimizes as it scrolls down and comes back as it scrolls up, as iOS 26's tab bar does:
- On glass, the bar shrinks to the selected item's icon on the left, the action to a circle on the right, and the accessory moves down between them. A tap on the minimized bar brings the dock back.
- On Material, the toolbar slides off the screen and the floating action button stays.
- Before iOS 26, the tab bar stays where it is: Apple's tab bars didn't minimize.
It comes back at the top of the content, and when the screen goes. To minimize or bring it back yourself, set UiDockState:
ui-dock-scroll reads the scroll view's events itself rather than through a template listener, which would run change detection on every event, about every frame while content moves. It updates the dock only when it changes. Your template handlers already run on Lynx's main thread, beside the native scroll, so it needs no main-thread script.
Away on a pushed screen
Give a tab a <lynx-stack-outlet>, and a screen it pushes over the tab's first screen takes the dock away, as iOS and Material do with the screens they drill down to. The example's Library is one: open an album.
- Where screens move as iOS's do, the screen underneath carries the dock: it moves a little left with that screen, and the pushed screen slides over it, rounded corner and shadow and all.
- Where they move as Android's do, it slides down off the screen.
- Back, Android's back button or a swipe brings it back, following the finger while it drags. While it's away, screen readers skip it and it takes no taps.
ui-dock-scrollon a pushed screen leaves the dock alone, so the screen under it gets the dock back as it left it.- A screen that pads its end for the dock can drop the padding while the dock is away:
inject(LynxStackPage, { optional: true })?.bottomBarHidden().
A route keeps the dock with data: { bottomBar: 'visible' }. See LynxStackChrome for what the stack says, and LynxStackBottomBar to have a screen carry a bar of your own.
The action
<ui-dock-action> is the button beside the bar. Like an item, it navigates to a route and is selected while the route is active. Without a route, handle (pressed):
On glass, it's a circle in the same glass group as the bar, so the two merge as they near each other. The label is what a screen reader says, since the button shows only its icon.
Search
Put a <ui-search-field> in the dock beside a search action, and the action opens a search field at the bottom of the screen, within reach, as iPhone apps search on iOS 26:
- With a
route, it's a search tab: the field is open while its screen shows, which can suggest searches until the field is tapped. Tapping the field brings up the keyboard. - Without a route, the action opens the field over the screen you're on and gives it the keyboard.
UiDockState'ssearchingsays whether it's open, and sets it from code:inject(UiDockState).searching.set(true). - The dock rises with the field above the keyboard, and settles when it closes.
What opens on each platform:
- On glass, the action grows into the field across the bottom, and the bar shrinks to one button that goes back to the last item you were on. With
cancelable, a glass circle with an x grows out of the field's end while it's in use: it clears the field and closes the keyboard, and for an action without a route, closes the search. - On Material, the floating action button grows into Material 3's search bar across the bottom, and the toolbar slides away. The search bar's back arrow goes back.
- Before iOS 26, the tab bar stays, and the field opens in a bar above it, on the same material. With the keyboard up, the bar sits on the keyboard, as Safari's did. Cancel closes a search the action opened; on a search tab it clears the field.
The dock doesn't minimize while it searches. openSearch() and closeSearch() open and close it from code.
The accessory
Mark content with ui-dock-accessory and the dock puts it in a glass bar above itself, for something that stays at hand on every screen, such as what's playing:
When the glass dock minimizes, the accessory moves into the row beside the bar, at the bar's height. Read the dock's minimized() to show less there. Color its text text-glass-foreground; <ui-icon>s in it get the same color.
Your own mark
For a mark the icon set doesn't have, such as your app's logo on the Home item, pass its markup to svg instead of icon. The action takes one too:
currentColortakes the item's color, as the set's icons do:primarywhile it's selected, and the bar's foreground otherwise (glass-foregroundon glass,muted-foregroundon Material and before iOS 26). A one-color mark written incurrentColorfollows the selection and your theme, and the minimized bar draws it inprimary.- Colors written out stay, so a multi-color mark keeps them.
xmlnsis optional, and lines must be<path>s, as for an icon's own SVG.
Badges and router options
Items take a badge and RouterLink's inputs, as tab bar items do:
(pressed) emits on every tap, including one on the selected item.
Dark mode
The icons draw with the light theme's colors until you say otherwise, and the glass follows the same setting. If your app switches to dark mode, set the color scheme with provideIconTheme().
API
UiDock
UiDockItem
UiDockAction
UiDockAccessory and UiDockScroll
UiDockState is a root service the dock and your screens share, with two signals: minimized, which ui-dock-scroll sets, and searching, whether the search an action without a route opens is open.
Accessibility
- Each item is one button, named by its
labeland then its badge: "Inbox, 3". The selected item has theselectedtrait, so iOS VoiceOver announces it. - On iOS, the row of items has the
tabbartrait, as a native tab bar does. - Away on a pushed screen, the dock is hidden from screen readers and takes no taps.
- The minimized dock is one button, "Show tab bar", with the selected item's label as its value. The hidden items are hidden from screen readers too. While the glass dock searches, the same button goes back, with the last item's label as its value.
- The search field is a search field to screen readers, and its Cancel a button (see Search Field). The action it opened from is hidden while it's open.
- Reduce Motion: the capsule, the minimizing and the search opening change at once instead of sliding, shrinking, growing or fading.
- Reduce Transparency and Increase Contrast are handled by the glass.
Related
- Tab Bar: the same navigation, as a plain bar along the bottom edge
- Search Field: the field the dock searches with
- Glass: the glass the dock is drawn with
- Routing and navigation: set up the router and its routes
- Safe area: the inset the dock clears
