npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oge-ui/navigation

v1.1.10

Published

Signal-based Angular navigation family: OgeTreeView with flat or nested data and APG treeview keyboard support, OgeDrawer whose modality follows its layout mode, OgeStepper with async leave guards, OgeMenubar — a WAI-ARIA APG menubar with nested submenus

Downloads

994

Readme

@oge-ui/navigation

Navigation controls for the OGE UI suite (Angular and React) — this is the Angular package. Signal-based, standalone, zoneless-ready, MIT.

Today the package ships OgeTreeView, OgeDrawer, OgeStepper, OgeMenubar, OgeBreadcrumb and OgePagination.

npm install @oge-ui/navigation

Tree View

<oge-tree-view [items]="folders" keyExpr="id" parentIdExpr="parentId" displayExpr="name" selectionMode="multiple" showCheckBoxes="normal" [(expandedKeys)]="open" [(selectedKeys)]="picked" />

Nested payloads work just as well — point itemsExpr at the children field and the parent links are derived:

<oge-tree-view [items]="tree" itemsExpr="children" displayExpr="name" />

What it does

  • Either data shape — a flat parent-referencing array or nested children, normalized by @oge-ui/core's tree engine into one pipeline.
  • Accessibility — the WAI-ARIA APG treeview pattern: a roving tabindex over role="treeitem" rows, Down/Up, Right/Left with the proper open/first-child and close/parent semantics, Home/End, type-ahead and * to expand a level. Multi-select adds Space, Shift+Arrow, Ctrl+Shift+Home/End and Ctrl+A.
  • Flat DOM — depth is carried by aria-level / aria-posinset / aria-setsize rather than nested role="group" wrappers. The APG sanctions this, and it is what makes virtualization possible.
  • Tri-state checkboxes — checking cascades down to descendants and normalizes up, so a parent is checked only when every child is. Report the result as all, leavesOnly or excludeRecursive via selectedKeysMode.
  • Search — accent- and locale-insensitive, auto-expands the ancestors of a match so it is reachable, and highlights the matched substring.
  • Lazy load on demand — loadChildren fetches a node's children on first expand behind a placeholder row; fetched children join the index, so cascading selection reaches them.
  • Virtual scrolling — windowed rendering for very large trees, built on core's OffsetTree; keyboard focus scrolls the target into view first.
  • Drag & drop — drop inside, before or after a node, with a cycle guard, hover-to-expand and Escape to cancel. The tree emits itemReordered and leaves the data change to you.
  • Theming — the shared --oge-* design tokens, logical properties for RTL, and prefers-reduced-motion support.

See the API reference for the full surface.

Drawer

<oge-drawer [(opened)]="menuOpen" mode="side" [size]="240" [compactBelow]="720" ariaLabel="Sections">
  <oge-tree-view ogeDrawerPanel [items]="nav" />
  <router-outlet />
</oge-drawer>

One component, not the container/drawer/content trio the reference libraries need: the panel is the [ogeDrawerPanel] slot, everything else projected is the content.

What it does

  • Three layout modes — overlay floats over the content, push shifts it aside without resizing it, side shrinks it so both share the row. Four logical edges (start/end/top/bottom), so RTL needs no flag.
  • Modality is derived from mode, never configured. overlay and push cover or displace the content, so they are dialogs: role="dialog", aria-modal, a focus trap, Escape, and inert on the background. side shares the row, so it is a landmark (navigation / complementary / region) with none of those. WAI-ARIA has no drawer pattern and conditions modality on background interaction actually being blocked — an independent flag is exactly what lets a panel claim role="complementary" and aria-modal="true" at once.
  • Compact rail — minSize is the closed size, so a side drawer can collapse to an icon rail instead of a gap, and stay keyboard reachable.
  • Responsive to its own container — compactBelow measures the drawer's own box, never the window, so a drawer nested in a dialog or a split pane adapts to the room it actually has. The rule is core's pure resolveDrawerMode().
  • One Escape stack — the drawer registers with the same overlay stack every other OGE surface uses, so a popup opened inside it closes before it does.
  • Safe areas — the panel pads itself with env(safe-area-inset-*), so it clears notches and home indicators on mobile devices.
  • Chrome — an optional showCloseButton, a disabled switch that blocks the open/close gestures without disabling the panel's content, and toggle(force?) for driving the drawer from a router or a media query.
  • Async closeGuard — false, a throw and a rejection all veto the close; a promise reports closePending, and a second gesture meanwhile is dropped.

See the API reference for the full surface.

Stepper

<oge-stepper [(activeIndex)]="step" [linear]="true" [showNavigation]="true">
  <oge-step label="Account" [completed]="accountValid()">…</oge-step>
  <oge-step label="Shipping" [optional]="true">…</oge-step>
  <oge-step label="Review">…</oge-step>
</oge-stepper>

Steps come from projected children, from a data-driven steps array, or both (children first).

What it does

  • Accessibility, decided rather than inherited — there is no WAI-ARIA APG stepper pattern, so this is an ordered list of <button> headers carrying aria-current="step", each body a role="region" labelled by its header. One semantic in both orientations: Angular Material instead emits a tablist when horizontal and aria-current when vertical, so the same widget reads as two different things to a screen reader. A tablist also claims panels may be browsed freely — exactly what linear forbids.
  • Keyboard — the headers are buttons in a list, so they are all Tab-reachable with no roving tabindex to get in the way. keyboardNavigation adds arrow/Home/End as an enhancement; it moves focus only, and does not wrap, because a process does not loop from the last step to the first.
  • Linear flow — linear blocks moving past a step that is neither completed nor optional, editable: false blocks coming back, and every refusal emits stepBlocked with the reason. Material refuses silently.
  • Async stepGuard — false, a throw and a rejection all veto; a promise reports changePending, a second gesture meanwhile is dropped, and the guard gates the finish on the last step too.
  • Navigation — a built-in Back / Next bar via showNavigation (none of the three references ships one), plus [ogeStepperNext] / [ogeStepperPrevious] directives that work inside the stepper or bound to it from outside.
  • Lazy content — deferRendering creates a body on first activation, keepAlive keeps it mounted afterwards.

Inside a form, <oge-form-steps> wraps this component and derives each step's completion from the form's own error rollup — identically in all three binding modes — and touches only the step being left, so the steps ahead stay quiet.

See the API reference for the full surface.

Menubar

<oge-menubar [items]="menu" (itemClick)="run($event)" />

Items come from a data tree, from nested <oge-menubar-item> children, or both (children first). Children at any depth open as nested submenus.

What it does

  • The full WAI-ARIA APG menubar pattern — role="menubar" with a roving tabindex, Left/Right between items, Down/Enter into a submenu (Up opens focusing the last item), Right on a leaf hopping to the next bar item with its menu open, Escape unwinding one level at a time, Home/End and accent-insensitive type-ahead. A vertical bar keeps the same roles with aria-orientation="vertical" and swapped axes.
  • Know when not to use it — the APG's own advice: for plain site navigation, a <nav> of links (optionally with the disclosure pattern) serves better than menubar semantics. This component is for application-style command menus. (Angular Material has no menubar at all — MatMenu is a button-triggered dropdown; the CDK's cdkMenuBar is the closest reference.)
  • Shared machinery, not a second menu — submenus at every depth are the suite's canonical oge-menu-list in an anchored panel on the one shared Escape stack, so a menubar submenu, a grid context menu and a drop-down button all behave — and can now all nest — identically.
  • Open mode without the knob forest — openMode: 'click' | 'hover' governs the top level only; nested levels always open on hover (50/300 ms show/hide dwell) and on ArrowRight/Enter, the reference libraries' first-vs-nested split baked in as behavior.
  • Responsive to its own container — compactBelow measures the menubar's own box, never the window; below it the whole bar becomes one hamburger button opening the full tree as nested menus. The rule is core's pure resolveMenubarCompact().
  • Router-friendly without a router dependency — url items render as real links, activeKey marks the current item with aria-current="page", and itemClick (with its hierarchical path) is where navigation happens.
  • Cancelable pipeline — submenuOpening / submenuClosing carry the house mutable cancel flag; submenuOpened / submenuClosed report, with the close reason.
  • Accelerators and badges — shortcut renders a right-aligned hint announced via aria-keyshortcuts (no reference menu renders accelerator text at all; the actual key binding stays the application's), badge adds a counter pill — both live on the canonical OgeMenuItem, so every menu in the suite gained them.

See the API reference for the full surface.

Breadcrumb

<oge-breadcrumb [items]="trail" (itemClick)="go($event)" />

Crumbs come from a flat data trail, from <oge-breadcrumb-item> children, or both (children first).

What it does

  • The WAI-ARIA APG breadcrumb, verbatim — a <nav> landmark holding an ordered list of real links, the current page carrying aria-current="page" and never interactive, separators aria-hidden decoration. The APG defines no keyboard behavior for a breadcrumb, so none is invented: crumbs are plain links in the Tab order, with no roving tabindex. (Neither DevExtreme nor Angular Material/CDK ships a breadcrumb at all — the parity references are Kendo and PrimeNG.)
  • Container-width collapse that loses nothing — collapseMode: 'auto' (default) measures the breadcrumb's own box, never the window, and collapses the oldest middle crumbs first; first and last always stay visible. Unlike the references, the collapsed crumbs stay reachable: the ellipsis button opens them as real links in the suite's shared menu. The fitting arithmetic is core's pure fitToolbarItems — the same kernel the toolbar's overflow uses. 'wrap' breaks onto rows, 'none' keeps one scrollable row.
  • Router-friendly without a router dependency — url crumbs render as real <a href> (middle-click and copy-address work); preventDefault() in itemClick hands navigation to a router. itemClick carries { item, key, index, event } and never fires for disabled crumbs or the last crumb.
  • Templates that cannot break the semantics — [ogeBreadcrumbItemTemplate] replaces the crumb's interior only (link/current/disabled elements stay with the component); [ogeBreadcrumbSeparatorTemplate] renders inside the aria-hidden separator.
  • Config — provideOgeBreadcrumbConfig(); the nav landmark's label and the ellipsis button's label live in OgeBreadcrumbMessages.

See the API reference for the full surface.

Pagination

<oge-pagination [(pageIndex)]="page" [itemCount]="total" [pageSize]="20" />

What it does

  • A constant-width numeric window with real ellipsis markers — ellipsis slots count toward maxButtons (default 7), so paging from the first page through the middle to the last never changes how many slots render and the bar never jitters. An ellipsis never hides a single page (the page renders instead). The window arithmetic is core's pure resolvePageWindow.
  • The grid pager's contracts, kept aligned by design — pageIndex is 0-based and two-way; pageSize: 0 means "all items on one page"; pageSizes accepts 'all'. pageChanged/pageSizeChanged fire only on user interaction with previousPageIndex/previousPageSize; programmatic writes and auto-clamps update the models silently.
  • Unknown totals, written down — omit itemCount and only prev/next plus a "Page N" indicator render; next never disables because the component cannot know the end (clamp pageIndex at the app level when the server reports the last page).
  • Composed accessibility — no APG pagination pattern exists, so the markup composes a <nav> landmark named by messages, real buttons with aria-current="page" on the active page and the info range in an aria-live="polite" region. Keyboard is the native Tab order.
  • Adaptive against its own container — displayMode: 'adaptive' swaps to the compact N / M indicator below compactBelow (default 480px), measured by ResizeObserver against the bar's own box, never the window.
  • Config — provideOgePaginationConfig(); every string incl. the info template ({from}–{to} of {itemCount}) lives in OgePaginationMessages.

See the API reference for the full surface.

For AI coding assistants

The complete machine-readable API reference ships inside the package at node_modules/@oge-ui/navigation/llms.txt — conventions, every documented member and copy-pasteable demos in one file. Online: https://www.ogeui.com/llms.txt (index) and https://www.ogeui.com/llms-full.txt (the whole suite).

License

MIT