Link
Client-side navigation component that handles internal routing, hash navigation, and history management without full page reloads.
Source
Type Definition
function Link({
href,
ref,
children,
...props
}: {
href: string
ref?: React.Ref<HTMLAnchorElement>
} & React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
href | string | ✅ | - | The URL to navigate to. Supports internal routes, hash navigation (#element), and back navigation (-1) |
ref | React.Ref<HTMLAnchorElement> | ❌ | - | Reference to the underlying anchor element |
children | ReactNode | ❌ | - | Content to display inside the link |
...props | React.AnchorHTMLAttributes<HTMLAnchorElement> | ❌ | - | Additional HTML anchor element attributes |
Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
href | string | ✅ | - | The destination URL or path for the link. Supports internal routes, hash navigation (#element), and back navigation (-1) |
ref | React.Ref<HTMLAnchorElement> | ❌ | - | Reference to the underlying anchor element |
children | ReactNode | ❌ | - | Content to display inside the link |
...props | React.AnchorHTMLAttributes<HTMLAnchorElement> | ❌ | - | Additional HTML anchor element attributes (className, style, onClick, etc.) |
Last modified: 2025-06-10