Link - smbc-digital/form-builder GitHub Wiki

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