GC Design SystemComponents
GC Design System Start to use Page templates overviewBasic page Components overviewAlertBreadcrumbsButtonCardCheckboxesContainerDate inputDate modifiedDetailsError messageError summaryFieldsetFile uploaderFooterGridHeaderHeadingIconInputLanguage toggleLinkNoticePaginationRadiosScreenreader-onlySearchSelectSide navigationSignatureStepperTableTextTextareaTheme and topic menuTop navigation CSS Shortcuts overview Reset styles Responsive layoutState Box sizingContainer sizingDisplayOverflowPositionVisibility FontFont familyFont sizeFont styleFont weightLine heightLink colourLink sizeLink text decorationList styleText alignText colourText overflowText transformWord break MarginPadding Align contentAlign itemsAlign selfFlexFlex directionFlex growFlex shrinkFlex wrapGapGrid columnsGrid rowsJustify contentJustify itemsJustify selfOrderPlace contentPlace itemsPlace self Background colourBorder colourBorder radiusBorder styleBorder width Icon namesIcon sizeImage CursorPointer eventsTransition Styles overviewDesign tokensColourSpacingTypography Contact usGet InvolvedFind a demo

Link
<gcds-link>

Also called: anchor, hyperlink, call to action. A link is a navigational element that brings a person to a new page, website, file, or section on the current page.

Link component preview

On this page

Provide information for download files

  • Provide information in the link text about the file type and size of files for download: <gcds-link href="application.pdf" download>Application 2023 (PDF, 1.5 MB)</gcds-link>.
  • Avoid placing the download link within paragraph text.
Note: Only files with URLs of the same origin as the website will be downloaded to the user’s device.
  • A skip-to-content link lets a person skip a cluster of navigation links and jump to the main content.
  • To avoid covering up content, configure the link to push down content so it’s not floating, For desktop, place skip-to-content link at top left of the page so it doesn’t interrupt the flow.
  • Add an external link by setting the external attribute to true.
  • Avoid adding external links:
    • In the middle of a person’s progress, like when a person’s filling out a form.
    • If changing pages would make them lose unsaved progress.
    • When starting a process would stop if the person follows a link, like when they’re watching a video or completing a main task.
    • When they’re invasive and disruptive to the flow of the page.
    • When it could be a surprise to a person to find themselves somewhere else unexpectedly.
  • Make it obvious where a link will lead, so a person can decide if they should leave the current page.
  • Communicate clearly when links have special conditions. For example, when they’re only available inside a closed network because of a firewall.

Examples

Explore the different ways you can configure the component. Each example shows a working implementation and ready-to-copy code.

In this section

Essential attributes

These attributes are needed for the component to function correctly.

href

The href attribute specifies the URL of the page the link goes to.
<gcds-link href="#">Navigation link</gcds-link>

Optional attributes

These attributes allow you to customize or extend the component’s behaviour and presentation.

display

The display attribute sets the display behaviour of the link. The available options are:
  • inline (default)
  • block
<gcds-link display="block" href="#">
  Navigation link
</gcds-link>

download

The download attribute specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
<gcds-link href="download.pdf" download="file.pdf" type="application/pdf">
  Download document (PDF, 1.5 MB)
</gcds-link>

external

The external attribute controls whether the link is external or not. When set to true, an external icon is added after the link.
<gcds-link external="true" href="#">
  Navigation link
</gcds-link>

link-role

The link-role sets the main style of the link. The available options are:
  • default (default)
  • light
<div class="bg-dark p-300">
  <gcds-link link-role="light" href="#">
    Navigation link
  </gcds-link>
</div>

rel

The rel attribute specifies the relationship between the current document and the linked document. It is commonly used for security and privacy purposes, especially when links open in a new tab or window.
<gcds-link rel="license" href="#license">
  Navigation link
</gcds-link>

size

The size attribute sets the link size. The available options are:
  • inherit (default)
  • regular
  • small
<gcds-link size="small" href="#">Navigation link</gcds-link>

target

The target attribute specifies where the linked resource is opened. For example, it can open the link in the same browsing context or in a new tab or window.
<gcds-link target="_blank" href="#">
  Navigation link
</gcds-link>

type

The type attribute specifies the media type of the linked document.
<gcds-link href="download.pdf" download="file.pdf" type="application/pdf">
  Download document (PDF, 1.5 MB)
</gcds-link>

Slots

The default slot allows you to inject custom content into the component’s primary content area, and named slots, into specific areas.

default

The default slot is for placing the link text.
<gcds-link href="#">Navigation link</gcds-link>
Code builder Generate an instance of the component you need by selecting its code properties.
  • Explore by choosing different code values to generate the instance you want.
  • Get the code and pull it into your environment.
  • Add any copy you need to the component (like text for a label).
Note: The code builder uses English for all code elements, which follows standard practice. Navigation link
Help us improve Have questions or a request? Give feedback on our contact form. Something's wrong? Raise it through GitHub with an account. You'll have access to the team's direct responses, progress made on your issue, and issues raised by others. Give feedback Report an issue on GitHub
2026-05-20