Chaotic Fish Design Wayfin · live demo

Joomla module · Live demo

Wayfin: a menu that swims with you

Scroll and watch the menu keep up. Click anything in it, press [ and ], or open Tune the tank (bottom left) to change the swimmer, the theme or the whole style, live.

What it does

Wayfin reads a page's headings and builds this menu by itself. Nobody typed it. Headings that already have an ID use it for their menu text (underscores turn into spaces, words get capitals); headings without one get an ID added and keep their own wording.

The highlighted item is the section you're in. The orange line down the rail fills like a water level as you read, and the underline under the current item shows how far through that section you are.

Headings without IDs

This heading had no ID, so Wayfin added headings_without_ids and kept its words as written. Hover it and a small hook appears: click it to copy a link straight to this spot.

Goats can and will eat a hat while you are still wearing it. That has nothing to do with menus, but this section needed a second paragraph so there's something to read.

This heading's text is ignored

This one had an ID, separators_and_groups, so the menu shows that instead. Because this <section> holds three headings and has an ID of its own, the menu groups them under a separator: Getting Started.

With Fold Groups on, only the group you're reading stays open. Everything else folds up to its separator, which still links straight to the group's first heading.

The swimmer

This section has no ID, so its first heading became the separator itself. That's the swimmer's whole job: ride the rail at your reading position, turn to face the way you're scrolling, and wag a little faster while it moves.

Pick a species

Fish, clownfish, pufferfish, shark, Hawke the goat, Tancho the horse, or your own image. Sea creatures swim along the rail; the land animals stay upright, face the way you're going and hop. Open Tune the tank to try them.

Bubbles trail the swimmers. The goat and horse kick up dust instead, which is only fair.

The school

Spend a little time in a section and scroll past it, and it earns a read marker: a check in the menu and a filled dot on the rail. Every section read also adds a tiny follower to the swimmer's school, so long reads end with a crowd.

Quick jumps through the menu don't count. A section has to be scrolled past and actually spent time in, about a third of its reading time.

The finish

Reach the very bottom of the page and the swimmer celebrates. The fish does a flip, the pufferfish puffs up (spikes and all), and the land animals do a happy hop. The timer under the menu tells you how far there is to go.

Sonar

Click any menu item or use the keys and you'll see rings pulse out from the heading you land on, so your eye knows exactly where to look. With Ping Sound on, you'll hear a soft sonar blip too. Browsers only allow that after a click or keypress, so it never plays by itself.

Visitors who ask their device for reduced motion get a single soft glow instead of rings, instant jumps, and a swimmer who holds still.

The fish tank This box isn't a heading, but it's in the menu as The fish tank. That's data-wayfin-heed: point it at a module's wrapper (a demo, a form, a gallery) and Wayfin will link to it.

Ignored inside

This heading sits inside the heeded box, which is also marked data-wayfin-ignore, so the box gets one menu item and its insides stay out of the menu.

Questions people actually ask

This heading uses data-wayfin-label to override both its ID and its text. Handy for acronyms, which would otherwise come out as "Faq".

Does it need jQuery?

No. One small script and one stylesheet, no dependencies, loaded through Joomla's Web Asset Manager.

Will it remember me?

If you leave partway down and come back, a card offers to swim you back to where you were. Read markers can be remembered too. All of it lives only in your own browser; nothing is sent anywhere. Tune the tank has a button to forget it all.

What about phones?

Below the breakpoint the menu becomes a slim bar under the header that shows where you are. Tap it to open the full list.

Not in the menu

This box is marked data-wayfin-ignore, so its heading is skipped. Useful for asides, callouts and modules that bring their own headings.

For developers

Wayfin fires events you can hook into for analytics or your own code. Open Tune the tank to watch them arrive live.

wayfin:jumpAny jump, with how it happened: menu, separator, key, resume or surface.
wayfin:readA section earned its read marker, with the seconds spent.
wayfin:finishThe visitor reached the end.
wayfin:copyA copy-link hook was used.
wayfin:resumeThe visitor clicked Swim back.
wayfin:changeThe current section changed.

Ship it

A hyphenated ID, shown as "Ship It". Keep going to the bottom to see the swimmer celebrate.

Wayfin works with Joomla 5.4 and 6 and any template. It's built by Chaotic Fish Design, mostly for our own sites, and it's free.