LinkText

An inline text hyperlink.

It implements the <a> element.

Styles

Import the styles within a Next.js custom app in pages/_app.js.
import 'device-agnostic-ui/public/components/LinkText.css';

Props

Use any valid <a> props.

Examples

Deep import.
import LinkText from 'device-agnostic-ui/public/components/LinkText.js';
Deep require.
const LinkText = require('device-agnostic-ui/public/components/LinkText');
Index import. Convenient, but technically inferior to a deep import.
import { LinkText } from 'device-agnostic-ui';
Index require. Convenient, but technically inferior to a deep require.
const { LinkText } = require('device-agnostic-ui');
External link.
import { LinkText } from 'device-agnostic-ui';

const result = <LinkText href="https://reactjs.org">React</LinkText>;
Internal Next.js route link.
import { LinkText } from 'device-agnostic-ui';
import Link from 'next/link';

const result = (
  <Link href="/" passHref>
    <LinkText>Home</LinkText>
  </Link>
);

Tags