Skip to content
Lydia Gray edited this page Apr 26, 2022 · 8 revisions

Link

This allows the user to create a link button.

Property Type Required Default Value Description
Text string ✔️ text used for the link
Url string ✔️ the url for the link
OpenInTab bool true if the link should open in a new tab when clicked, this defaults to true but can be disabled
ClassName string Classes to apply if any to the link
DisplayRightChevron bool false If the right chevron should be displayed correct classnames must be proviced if enabled, check govuk design-system for classes

Link Json example:

{
  "Type": "link",
  "Properties": {
    "Text": "Go to the homepage",
    "Url": "https://www.stockport.gov.uk/",
    "OpenInTab": true,
    "ClassName": "govuk-button"
 }
}

Link Json example with right chevron:

{
  "Type": "link",
  "Properties": {
    "Text": "Start now",
    "Url": "https://www.stockport.gov.uk/",
    "OpenInTab": true,
    "ClassName": "govuk-button govuk-button--start",
    "DisplayRightChevron": true
 }
}

image

Clone this wiki locally