Dev Helpers
← Back

Deep section link

Place this file at components/DeepSectionLink.tsx in an App Router project.

Open this example in the interactive library

Source code

// components/DeepSectionLink.tsx

import Link from "next/link";

export default function DeepSectionLink({
  href = "/guide",
  label = "Read guide",
}: { href?: string; label?: string } = {}) {
  return (
    <Link href={{ pathname: href, hash: "examples" }}>Jump to examples in {label}</Link>
  );
}