BrowseBottom Bar

Navigation

Glass Bottom Bar

The bar at the bottom of an iOS app in one element: tabs from your data, a press lens and a search that opens beside them. Turn each part on or off.

Preview

Home

Installation

Install the package once, then import the parts you use into a standalone component.

Install

npm install ngx-vitreo @angular/cdk @floating-ui/dom
Import

import { GlassBottomBar, GlassBottomBarIcon } from 'ngx-vitreo';

@Component({
  imports: [GlassBottomBar, GlassBottomBarIcon],
  // ...
})

Usage

Usage

<glass-bottom-bar
  navigationLabel="Music"
  searchPlaceholder="Artists, songs and more"
  [items]="items"
  [(value)]="tab"
  [(query)]="query"
  [search]="search()"
  [labels]="labels()"
  [lens]="lens()"
/>

<!-- items: GlassBottomBarItem[] -->
<!-- { value: 'home', label: 'Home', icon: 'M4.5 10.2 12 4l7.5 6.2V19…' } -->

API reference

GlassBottomBar

glass-bottom-bar

InputTypeDefaultDescription
itemsGlassBottomBarItem[]NoneThe tabs, in order: { value, label, icon?, disabled? }. icon is SVG path data on a 24 × 24 grid, drawn as a rounded stroke. Required.
[(value)]string the first item The selected tab's value.
labelsbooleantrueShows each label under its icon; off, the tabs are icons alone, named by their labels.
lensbooleantrueLifts the selection into a lens that magnifies the tabs while pressed, and slides with the pointer.
searchbooleantrueShows the search button. Open, the tabs fold into a circle and the field grows out of the button.
searchPlaceholder / searchLabelstring'Search' / 'Search'The field's placeholder and the closed search button's accessible name.
[(searchOpen)] / [(query)]boolean / stringfalse / ''Whether search is open, and its text.
clearSearchOnClosebooleantrueClears the text when search closes, as cancelling a search does on iOS.
(searchSubmitted)stringNoneEmits the text when Enter is pressed in the field.
navigationLabelstring'Tabs'The tab list's accessible name.

GlassBottomBarIcon

ng-template[glassBottomBarIcon]

InputTypeDefaultDescription
let-item / let-activeGlassBottomBarItem / booleanNoneDraws every tab's icon your own way, in place of icon path data. Make its root an <svg> or <img>.