Optional
aboutOptional
accessOptional
aria-Optional
aria-Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
Optional
aria-Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.
Optional
aria-Defines a string value that labels the current element, which is intended to be converted into Braille.
Optional
aria-Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
Optional
aria-Optional
aria-Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
Optional
aria-Defines the total number of columns in a table, grid, or treegrid.
Optional
aria-Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
Optional
aria-Defines a human readable text alternative of aria-colindex.
Optional
aria-Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
Optional
aria-Identifies the element (or elements) whose contents or presence are controlled by the current element.
Optional
aria-Indicates the element that represents the current item within a container or set of related elements.
Optional
aria-Identifies the element (or elements) that describes the object.
Optional
aria-Defines a string value that describes or annotates the current element.
Optional
aria-Identifies the element that provides a detailed, extended description for the object.
Optional
aria-Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
Optional
aria-Indicates what functions can be performed when a dragged object is released on the drop target.
Optional
aria-Identifies the element that provides an error message for the object.
Optional
aria-Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
Optional
aria-Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.
Optional
aria-Indicates an element's "grabbed" state in a drag-and-drop operation.
Optional
aria-Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
Optional
aria-Indicates whether the element is exposed to an accessibility API.
Optional
aria-Indicates the entered value does not conform to the format expected by the application.
Optional
aria-Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
Optional
aria-Defines a string value that labels the current element.
Optional
aria-Identifies the element (or elements) that labels the current element.
Optional
aria-Defines the hierarchical level of an element within a structure.
Optional
aria-Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
Optional
aria-Indicates whether an element is modal when displayed.
Optional
aria-Indicates whether a text box accepts multiple lines of input or only a single line.
Optional
aria-Indicates that the user may select more than one item from the current selectable descendants.
Optional
aria-Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
Optional
aria-Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
Optional
aria-Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.
Optional
aria-Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
Optional
aria-Indicates the current "pressed" state of toggle buttons.
Optional
aria-Indicates that the element is not editable, but is otherwise operable.
Optional
aria-Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
Optional
aria-Indicates that user input is required on the element before a form may be submitted.
Optional
aria-Defines a human-readable, author-localized description for the role of an element.
Optional
aria-Defines the total number of rows in a table, grid, or treegrid.
Optional
aria-Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
Optional
aria-Defines a human readable text alternative of aria-rowindex.
Optional
aria-Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
Optional
aria-Indicates the current "selected" state of various widgets.
Optional
aria-Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
Optional
aria-Indicates if items in a table or grid are sorted in ascending or descending order.
Optional
aria-Defines the maximum allowed value for a range widget.
Optional
aria-Defines the minimum allowed value for a range widget.
Optional
aria-Defines the current value for a range widget.
Optional
aria-Defines the human readable text alternative of aria-valuenow for a range widget.
Optional
autoOptional
autoOptional
autoOptional
autoOptional
childrenOptional
classOptional
colorOptional
contentOptional
contentOptional
contextOptional
dangerouslyOptional
datatypeOptional
defaultOptional
defaultOptional
dirOptional
discoverDefines the link discovery behavior
<Link /> // default ("render")
<Link discover="render" />
<Link discover="none" />
Optional
downloadOptional
draggableOptional
hiddenOptional
hrefOptional
idOptional
inlistOptional
inputHints at the type of data that might be entered by the user while editing the element or its contents
Optional
isSpecify that a standard HTML element should behave like a defined custom built-in element
Optional
itemIDOptional
itemOptional
itemOptional
itemOptional
itemOptional
langOptional
mediaOptional
nonceOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
onOptional
pingOptional
placeholderOptional
prefetchDefines the data and module prefetching behavior for the link.
<Link /> // default
<Link prefetch="none" />
<Link prefetch="intent" />
<Link prefetch="render" />
<Link prefetch="viewport" />
Prefetching is done with HTML <link rel="prefetch">
tags. They are inserted after the link.
<a href="..." />
<a href="..." />
<link rel="prefetch" /> // might conditionally render
Because of this, if you are using nav :last-child
you will need to use nav :last-of-type
so the styles don't conditionally fall off your last link (and any other similar selectors).
Optional
prefixOptional
preventPrevents the scroll position from being reset to the top of the window when the link is clicked and the app is using ScrollRestoration. This only prevents new locations reseting scroll to the top, scroll position will be restored for back/forward button navigation.
<Link to="?tab=one" preventScrollReset />
Optional
propertyOptional
radioOptional
referrerOptional
relOptional
relativeDefines the relative path behavior for the link.
<Link to=".." /> // default: "route"
<Link relative="route" />
<Link relative="path" />
Consider a route hierarchy where a parent route pattern is "blog" and a child route pattern is "blog/:slug/edit".
".."
will remove both :slug/edit
segments back to "/blog"...
will only remove one URL segment up to "/blog/:slug"Optional
reloadWill use document navigation instead of client side routing when the link is clicked: the browser will handle the transition normally (as if it were an <a href>
).
<Link to="/logout" reloadDocument />
Optional
replaceReplaces the current entry in the history stack instead of pushing a new one onto it.
<Link replace />
# with a history stack like this
A -> B
# normal link click pushes a new entry
A -> B -> C
# but with `replace`, B is replaced by C
A -> C
Optional
resourceOptional
resultsOptional
revOptional
roleOptional
securityOptional
slotOptional
spellOptional
stateAdds persistent client side routing state to the next location.
<Link to="/somewhere/else" state={{ some: "value" }} />
The location state is accessed from the location
.
function SomeComp() {
const location = useLocation()
location.state; // { some: "value" }
}
This state is inaccessible on the server as it is implemented on top of history.state
Optional
styleOptional
suppressOptional
suppressOptional
tabOptional
targetOptional
titleCan be a string or a partial Path:
<Link to="/some/path" />
<Link
to={{
pathname: "/some/path",
search: "?query=string",
hash: "#hash",
}}
/>
Optional
translateOptional
typeOptional
typeofOptional
unselectableOptional
viewEnables a View Transition for this navigation.
Click me
To apply specific styles for the transition, see useViewTransitionState
Optional
vocab
Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.