Provides declarative, accessible navigation around the application and external links.
Usage
import { Link } from 'nr1'
Examples
Basic
<Link to="https://www.google.com">Click me</Link>
With location object
function render() { const launcher = { id: 'nr1-core.explorer' }; const location = navigation.getOpenLauncherLocation(launcher);
return <Link to={location}>Click me</Link>;}
Props
string | Use it to describe better the context of the component's action for users on screen readers.
|
REQUIREDnode | Content of the link. |
string | Appends class names to the component.Should be used only for positioning and spacing purposes. |
function | Callback fired any time the user clicks on the link. function ( |
string | ARIA attribute use to describe the |
enum[] | Spacing property. Spacing is defined as a tuple of zero to four values, which follow the same conventions as CSS properties like <Array of |
object | Inline style for custom styling.Should be used only for positioning and spacing purposes. |
string | Adds a Note: You might not see |
shape|string | Location object or url string to link to. shape
REQUIREDstring
string
string |