Open this example in the interactive library
Source code
// app/studio/layout.tsx
import type { ReactNode } from "react";
import Link from "next/link";
export default function LayoutWithSkipLink({ children }: { children: ReactNode }) {
return (
<>
<a href="#studio-main">Skip to content</a>
<nav>
<Link href="/studio">Studio</Link>
</nav>
<main id="studio-main" tabIndex={-1}>
{children}
</main>
</>
);
}
