Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 07 Navigation

Navigation

The app's main links, in a side bar. A named navigation landmark, links at least 44px tall, and the current page marked with a bar and bold text, not only a fill. On a phone, put the same links in a drawer.

Use it in Angular
import { NavComponent } from '@okaapi-ui/angular';
// Mark the current link with routerLinkActive ariaCurrentWhenActive="page".

A side bar

Angular
<ui-nav label="Main">
  <h2 class="ui-nav__title ui-label">Sales</h2>
  <ul>
    <li><a routerLink="/orders" routerLinkActive ariaCurrentWhenActive="page">Orders</a></li>
    <li><a routerLink="/invoices" routerLinkActive ariaCurrentWhenActive="page">Invoices</a></li>
  </ul>
</ui-nav>

In Arabic

Angular
<ui-nav label="الرئيسية">…</ui-nav>

When to use something else

If you needUse
A whole app layout with header and side barApp shell
Views of one pageTabs
Where the page sits in the siteBreadcrumbs

Inputs

NameTypeDefaultWhat it does
labelstring — Required. Names the landmark, so it differs from other navigation.
contentul, h2 — Lists of links, with optional group titles.

Keyboard and screen readers

  • A named navigation landmark; the current page is marked for screen readers and with a bar and bold text.