Link

The Link component routes a new view within the application router. It should be used instead of <a> to avoid reloading the page.

Usage

import { Link } from 'components/lib';

function MyComponent({ ...props }){
  return (
    <div>
      <Link url='/' title='Home' text='Go to Home' />
    </div>
  );
}

Props

PropDescriptionRequiredValue

children

children to render

required if no text prop

component(s)

className

custom style

optional

SCSS or Tailwind

color

link color

optional

string (dark/light), default: primary

text

link text

required

string

title

link title

required

string

url

destination url

required

string

Notes

  • The Link component uses the NavLink from react-router-dom for internal routing and <a> for external links.

  • The className prop allows for custom styling to be applied.

  • The color prop sets the link color and defaults to the primary color if not specified.

  • The text and title props provide the link text and title, respectively.

  • The url prop specifies the destination URL.

Last updated