Dev Helpers
← Back

Two-region skip navigation

Place this file at app/dashboard/layout.tsx in an App Router project. Supply app/dashboard/@activity/page.tsx and a default.tsx fallback for hard reloads.

Open this example in the interactive library

Source code

// app/dashboard/layout.tsx

import type { ReactNode } from "react";

export default function TwoRegionSkipNavigation({
  children,
  activity,
}: {
  children: ReactNode;
  activity: ReactNode;
}) {
  return (
    <>
      <nav>
        <a href="#overview">Overview</a> · <a href="#activity">Activity</a>
      </nav>
      <section id="overview">{children}</section>
      <aside id="activity">{activity}</aside>
    </>
  );
}