buntal - components

Link

Client-side navigation component that handles internal routing, hash navigation, and history management without full page reloads.

Source

View source on GitHub

Type Definition

function Link({
  href,
  ref,
  children,
  ...props
}: {
  href: string
  ref?: React.Ref<HTMLAnchorElement>
} & React.AnchorHTMLAttributes<HTMLAnchorElement>): JSX.Element

Parameters

ParameterTypeRequiredDefaultDescription
hrefstring-The URL to navigate to. Supports internal routes, hash navigation (#element), and back navigation (-1)
refReact.Ref<HTMLAnchorElement>-Reference to the underlying anchor element
childrenReactNode-Content to display inside the link
...propsReact.AnchorHTMLAttributes<HTMLAnchorElement>-Additional HTML anchor element attributes

Properties

PropertyTypeRequiredDefaultDescription
hrefstring-The destination URL or path for the link. Supports internal routes, hash navigation (#element), and back navigation (-1)
refReact.Ref<HTMLAnchorElement>-Reference to the underlying anchor element
childrenReactNode-Content to display inside the link
...propsReact.AnchorHTMLAttributes<HTMLAnchorElement>-Additional HTML anchor element attributes (className, style, onClick, etc.)

Last modified: 2025-06-10

Content-Length: 0