Skip to Content
๐ŸŽ‰ Coral x Panda has been released ๐ŸŽ‰ Read the Migration Guide
DocumentationAtomsLink

Link

This component provides a visual cue that indicates interactivity of plain text

Basic Usage

Note: The Link component should always be wrapped inside a Typography component, so that the Link font size and weight will inherit from the font around it.

import { Link } from '@krakentech/coral'; <Typography> <Link href="#">This is a link</Link> </Typography>

This is a link

Properties

color

<Typography> <Link href="#" color="dark"> This is a link </Link> </Typography> <Typography color="error"> <Link href="#" color="inherit"> This is a link </Link> </Typography>

This is a link

This is a link

download

<Typography> <Link href="#" download> This tells the browser to download rather than redirect </Link> </Typography>

This tells the browser to download rather than redirect

target

<Typography> <Link href="#" target="_blank"> This is a link that opens in a new window </Link> </Typography>

This is a link that opens in a new window

Responsiveness

<Typography> <Link href="#" color={{ base: "tertiary500", md: "secondary500" }}> This is a link </Link> </Typography>

This is a link

Full API

NameTypeDefault
refLegacyRef<HTMLAnchorElement> | undefined

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

keyKey | null | undefined

Design

Good to know

Choose a link when you want to redirect the user to an external site or to a document, this will usually precede or follow some text e.g โ€œDonโ€™t have an account? Sign upโ€. It is really important that link copy isnโ€™t super vague, make it specific, clear and friendly.

The short answer is a button does something and a link goes somewhere. The longer answer, buttons perform an action, should attract users attention and usually encourage conversion. Links should re-direct.

Why are there two colour variations?

Our primary theme is our voltage link, this should be used 99% of the time. Our secondary ink variation is to be used on top of ice.

Component breakdown

  • Text: Button text
  • Resting colour: Voltage & Ink
  • Hover colour: Aquamarine & Blue Tang
Last updated on