active
Type | Boolean (optional) |
---|---|
Default | false |
Does the link refer to the current page.
A navigation link to display in the Nav component.
It implements the <a>
element.
It should be wrapped in the <LinkNav>
component for an internal Next.js route link.
pages/_app.js
.import 'device-agnostic-ui/public/components/LinkNav.css';
import
.import LinkNav from 'device-agnostic-ui/public/components/LinkNav.js';
require
.const LinkNav = require('device-agnostic-ui/public/components/LinkNav');
import
. Convenient, but technically inferior to a deep import
.import { LinkNav } from 'device-agnostic-ui';
require
. Convenient, but technically inferior to a deep require
.const { LinkNav } = require('device-agnostic-ui');
<LinkActive>
component).import { LinkActive, LinkNav, Nav } from 'device-agnostic-ui';
const result = (
<Nav>
<LinkActive href="/components/LinkNav" passHref>
<LinkNav>LinkNav</LinkNav>
</LinkActive>
<LinkActive href="/components/Nav" passHref>
<LinkNav>Nav</LinkNav>
</LinkActive>
</Nav>
);