@@ -514,6 +514,18 @@ export interface LinkComponentRoute<
514514 ) : React . ReactElement
515515}
516516
517+ /**
518+ * Creates a typed Link-like component that preserves TanStack Router's
519+ * navigation semantics and type-safety while delegating rendering to the
520+ * provided host component.
521+ *
522+ * Useful for integrating design system anchors/buttons while keeping
523+ * router-aware props (eg. `to`, `params`, `search`, `preload`).
524+ *
525+ * @param Comp The host component to render (eg. a design-system Link/Button)
526+ * @returns A router-aware component with the same API as `Link`.
527+ * @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link
528+ */
517529export function createLink < const TComp > (
518530 Comp : Constrain < TComp , any , ( props : CreateLinkProps ) => ReactNode > ,
519531) : LinkComponent < TComp > {
@@ -522,6 +534,22 @@ export function createLink<const TComp>(
522534 } ) as any
523535}
524536
537+ /**
538+ * A strongly-typed anchor component for declarative navigation.
539+ * Handles path, search, hash and state updates with optional route preloading
540+ * and active-state styling.
541+ *
542+ * Non-obvious props include:
543+ * - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)
544+ * - `preloadDelay`: Delay in ms before preloading on hover
545+ * - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive
546+ * - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation
547+ * - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation
548+ * - `ignoreBlocker`: Bypass registered blockers
549+ *
550+ * @returns An anchor-like element that navigates without full page reloads.
551+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent
552+ */
525553export const Link : LinkComponent < 'a' > = React . forwardRef < Element , any > (
526554 ( props , ref ) => {
527555 const { _asChild, ...rest } = props
0 commit comments