LinkClickable()function
LinkClickable({
href,
disabled = !href,
target,
download,
title,
children = "Go",
className,
}: StylableClickableProps): ReactElement| Param | Type | |
|---|---|---|
props | StylableClickableProps | Props for a clickable that also accepts a className for styling. required |
.className | string |
| Return | |
|---|---|
ReactElement |
Render an <a href=""> element, resolving its href against the current page URL and marking it active when it matches.
- The
hrefis resolved against the current page URL and site root so site-absolute paths (/foo) honour the base subfolder. - Sets
aria-current="page"when the link points at the current URL.
Examples
<LinkClickable href="/about" className="link">About</LinkClickable>