The LinkOptions type extends the NavigateOptions type and contains additional options that can be used by TanStack Router when handling actual anchor element attributes.
type LinkOptions = NavigateOptions & {
target?: HTMLAnchorElement['target']
activeOptions?: ActiveOptions
preload?: false | 'intent' | 'viewport' | 'render'
preloadDelay?: number
disabled?: boolean
}
The LinkOptions object accepts/contains the following properties:
- Type: HTMLAnchorElement['target']
- Optional
- The standard anchor tag target attribute
- Type: ActiveOptions
- Optional
- The options that will be used to determine if the link is active
- Type: false | 'intent' | 'viewport' | 'render'
- Optional
- If set, the link's preloading strategy will be set to this value.
- See the Preloading guide for more information.
- Type: number
- Optional
- Delay focus, hover, and viewport preloading by this many milliseconds. Touch intent preloads immediately. If focus or hover ends, or the link leaves the viewport before the delay, the preload will be cancelled.
- Type: boolean
- Optional
- If true, will render the link without the href attribute