Mobile Navigation

A menu button that opens the links in a full-screen panel.

import { MobileNavigation } from '@brand-studio/ui';

export default function MobileNavigationDemo() {
  return (
    <MobileNavigation
      title="Still"
      items={[
        { label: 'Coffee', href: '#coffee', current: true },
        { label: 'Subscriptions', href: '#subscriptions' },
        { label: 'Brew guides', href: '#guides' },
        { label: 'Account', href: '#account' },
      ]}
    />
  );
}

Installation

pnpm add @brand-studio/ui

Usage

import { MobileNavigation } from '@brand-studio/ui';
<MobileNavigation title="Still" items={[{ label: 'Coffee', href: '/coffee', current: true }]} />

Accessibility

  • The button has a text label for screen readers. The panel is a modal dialog: focus moves inside, Escape closes it and focus returns to the button.
  • Following a link closes the panel.
  • Header includes this automatically; use it on its own when you build your own bar.

API Reference

PropTypeDefault
itemsNavLink[]
label?string'Menu'
title?string'Navigation'
closeLabel?string'Close menu'
className?string''

Still, Deskhand and Hollis are fictional brands. The coffee photographs are original generated artwork. @brand-studio/ui is MIT licensed.