Nathan Lamont

Notes to Self

Red Sea Navigation

Components:

  • Brand/Logo/Home
  • Menu - horizontal on desktop, panel with stacked items on mobile
  • Toggle Button - open and close the menu when it may be hidden

Each has three independent states. Only common state is "hidden"

ComponentA StateB StateC State
1. Brand/Logo/HomeFullCollapsedHidden
2. MenuHorizontal BarStacked PanelHidden
3. Toggle ButtonOpen/HamburgerClose/XHidden

The page has multiple states

  • Detectable by classes applied via JavaScript
    • Unscrolled - scrolled to the very top of the page beneath some threshold
    • Scrolled - scrolled down, beyond some threshold
      • Scrolled up - most recently scrolled up toward the top
      • Scroll down - most recently scrolled down toward the bottom
    • Untoggled - the toggle button has not been clicked (or has been toggled off)
    • Toggled - the toggle button has been clicked
  • Detectable by media query
    • Desktop
    • Mobile

The states of the components are applied according to the page’s state:

MobileMobileDesktopDesktop
Unscrolled/UpScrolledUnscrolledScrolled
Untoggled1A, 2C, 3A1C, 2C, 3C1A, 2A, 3C1B, 2C, 3A
Toggled1A, 2B, 3B1A, 2B, 3B1A, 2A, 3C1A, 2A, 3B

Note that for mobile, the "unscrolled" state applies to both unscrolled and scrolled + scrolled up, where for desktop unscrolled means only scrolled to the top.