Dev Helpers
← Back

Keep-position detail link

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

Open this example in the interactive library

Source code

// components/KeepPositionDetailLink.tsx

import Link from "next/link";

export default function KeepPositionDetailLink({
  href = "/guide",
  label = "Read guide",
}: { href?: string; label?: string } = {}) {
  return (
    <Link href={href} scroll={false}>
      {label}
    </Link>
  );
}