Marigold
Marigold

Application

MarigoldProvider
RouterProvider

Layout

AppLayoutbeta
Aside
Aspect
Breakout
Center
Columns
Container
Grid
Inline
Inset
Scrollable
Split
Stack
Tiles

Actions

ActionBaralpha
Button
Link
LinkButton
ToggleButtonbeta

Form

Autocomplete
Calendar
Checkbox
ComboBox
DateField
DatePicker
FileField
Form
Multiselectdeprecated
NumberField
Radio
SearchField
Select
Slider
Switch
TagFieldbeta
TextArea
TextField
TimeField

Collection

SelectList
Table
Tag

Navigation

Accordion
Breadcrumbsupdated
Pagination
Sidebarbeta
Tabsupdated
TopNavigationbeta

Overlay

ContextualHelp
Dialog
Drawer
Menu
Toastbeta
Tooltip

Content

Badge
Card
Divider
EmptyStatebeta
Headline
Icon
List
Loader
SectionMessage
SVG
Text

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useListData
useResponsiveValue
useTheme
VisuallyHidden
Components

Link

Interactive component to help users navigate to new pages.

The <Link> component is an interactive element that redirects users to different pages or sections within a website or application. It can also be used to enable file downloads, open the user's default email client to compose a new message, or show a specified address in a map application.

Anatomy

A link consists of text that indicates what the link will direct the user to. To distinguish a link from regular text, it is usually underlined.

Anatomy of a link

Appearance

The appearance of a component can be customized using the variant and size props. These props adjust the visual style and dimensions of the component, available values are based on the active theme.

Find your dream job at Reservix
PropertyTypeDescription
variantdefault | secondaryThe available variants of this component.
sizedefault | smallThe available sizes of this component.

The Link component supports variants to match different navigation contexts.

VariantDescriptionWhen to use
defaultColored link text matching the brand accent. This is the default variant.Standard inline navigation links within text content.
secondaryBold, underlined link in the foreground color that removes underline on hover.Links that should be prominent but don't use the brand color, often in headers or navigation areas.

Usage

Links serve as essential navigational tools in web design, enabling users to move seamlessly within an application, visit different websites or jump to specific elements on the same page. They can even be used to directly open apps to compose an email or make a call.

Using descriptive and meaningful labels for links is crucial to clearly indicate their destination. Generic phrases can leave users confused and helpless. Overusing links, especially inline, can overwhelm users and obscure their next steps. Use them sparingly to avoid clutter.

Do
Provide a meaningful descriptive label to the link that clearly indicates the link's destination.

Provide a meaningful descriptive label to the link that clearly indicates the link's destination.

Don't
Dont use generic phrases like "click here" or "go to" on links.

Don't use generic phrases like "click here" or "go to" on links.

Opening in new windows or tabs

Avoid opening links in new windows or tabs as it can be disorienting for users. It's acceptable to do so only when necessary, such as when the link leads to an external site, or when there's a risk of users losing their current place or task.

To support accessibility, ensure that such links include a warning for screen readers to alert users of the new window or tab. For more details on this practice, see the W3C guidelines.

Buttons or links

For actions that will change data, alter a state, or trigger a high-emphasis action, use a button instead of a link.

You can find more details on this on the button component page.

Phone numbers and emails

When using links with phone numbers (tel:) or emails (mailto:), it's important to ensure they serve a clear navigational purpose while triggering specific actions. For example, a phone number link should automatically initiate a call when clicked, and an email link should open the user's email client.

Make sure that the link text and any accompanying icons clearly indicate the action that will be triggered and the intended destination.

Do
Clearly indicate the action that will be triggered.

Clearly indicate the action that will be triggered.

Don't
Don't use vague labels without specifying how to reach out.

Don't use vague labels without specifying how to reach out.

Download links

Using the download attribute on an anchor element causes the browser to treat the linked URL as a download and allows setting a filename for the download.

Always indicate if a link triggers a download, and make the linked text clear about what will be downloaded, including the file type and size.

Download your print@home tickets (PDF, 15kb)
import { Center, Link } from '@marigold/components';export default () => (  <Center>    <Link href="/link/tickets-yakari-gustav-gans.pdf" download>      Download your print@home tickets <small>(PDF, 15kb)</small>    </Link>  </Center>);
Do
Clearly indicate what will be downloaded, including the file type and size.

Clearly indicate what will be downloaded, including the file type and size.

Don't
Don't use download links without indicating they trigger a download.

Don't use download links without indicating they trigger a download.

Integrating with a router

The <Link> component can be seamlessly integrated with your app's router (like Tanstack Router, Next.js or React Router) to retain all the accessibility features and functionality of the <Link> component.

For more details, you can read about this integration on the "RouterProvider" page.

Props

Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
View Link stories

Prop

Type

Related

Button

For triggering actions instead of navigating.

RouterProvider

Integrating Marigold components in a router
Last update: 3 minutes ago

Button

Buttons allow users to trigger actions.

LinkButton

Interactive component that resembels a button to help users navigate to new pages.

On this page

AnatomyAppearanceUsageOpening in new windows or tabsButtons or linksPhone numbers and emailsDownload linksIntegrating with a routerPropsRelated