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

@gravity-ui/navigation

v6.4.2

Published

Gravity UI Navigation components

Readme

@gravity-ui/navigation · npm package CI storybook

Aside Header Navigation · Preview →

Install

npm install @gravity-ui/navigation

Ensure that peer dependencies are installed in your project

npm install --dev @gravity-ui/uikit@^7.2.0 @gravity-ui/icons@^2.2.0 @bem-react/classname@^1.6.0 react@^19.0.0 react-dom@^19.0.0

Usage

Render AsideHeader as the app shell. It is a controlled component — you own the collapsed state via compact/onChangeCompact — and your page content goes through renderContent. Set up @gravity-ui/uikit styles and ThemeProvider first (see the uikit styles guide).

import React from 'react';
import {AsideHeader} from '@gravity-ui/navigation';
import {Gear, House} from '@gravity-ui/icons';
import {ThemeProvider} from '@gravity-ui/uikit';

import '@gravity-ui/uikit/styles/styles.css';

export function App() {
  const [compact, setCompact] = React.useState(false);

  return (
    <ThemeProvider theme="light">
      <AsideHeader
        logo={{text: 'My App', href: '/'}}
        compact={compact}
        onChangeCompact={setCompact}
        menuItems={[
          {id: 'home', title: 'Home', icon: House, current: true},
          {id: 'settings', title: 'Settings', icon: Gear},
        ]}
        renderContent={() => <main>Page content</main>}
      />
    </ThemeProvider>
  );
}

Sandboxes

Basic https://codesandbox.io/p/devbox/navigation-demo-simple-x9k5sd

Advanced https://codesandbox.io/p/devbox/recursing-dawn-6kc9vh

Roadmap 2025

  1. Support SSR
  2. Add more docs, examples to Gravity UI
  3. Support Navigation at UIKit themer
  4. Unify subheaderItem, menuItem, footerItem API

Components

CSS API

Used for themization Navigation's components

License

Distributed under the MIT License. See LICENSE for details.

For AI agents

Application-shell navigation components for Gravity UI apps — the collapsible AsideHeader sidebar plus footers, drawers, logo, hotkeys and settings panels that frame a whole page.

When to use

  • The app's primary navigation frame: AsideHeader (collapsible side navigation) with menuItems, subheader, and footer sections.
  • Supporting shell UI: Drawer/DrawerItem, Footer/MobileFooter, MobileHeader, HotkeysPanel, Settings, ActionBar, Logo.
  • Laying out page content inside the navigation frame via renderContent / PageLayout.

When not to use

  • Generic in-page controls (buttons, tabs, menus, breadcrumbs) — use @gravity-ui/uikit; this package is the outer app chrome, not general components.
  • Rendering the page body itself from config — use @gravity-ui/page-constructor.
  • Client-side routing — this provides the navigation UI only; wire clicks to your own router.

Common pitfalls

  • AsideHeader is controlled. You must own the collapsed state with compact and update it in onChangeCompact; passing compact without the handler freezes the sidebar.
  • Menu items are menuItems, keyed by id. Each item is {id, title, icon, current, onItemClick}; icon takes an icon component (e.g. from @gravity-ui/icons), not a string name.
  • Peer dependencies are required. @gravity-ui/uikit, @gravity-ui/icons, and @bem-react/classname must be installed alongside react/react-dom.
  • Needs uikit setup. Render inside ThemeProvider and import @gravity-ui/uikit/styles/styles.css, or the shell renders unstyled.
  • Page content goes through renderContent. Render your routed content via the renderContent prop / PageLayout, not as children.

Documentation for AI agents

Agent-readable documentation for the installed version is located in node_modules/@gravity-ui/navigation/build/docs/INDEX.md.