Skip to main content

Link

The Link component allows developers to easily build hyperlinks in apps to link to other pages in the app or external websites.

You'll commonly use the Link component to build Navigation Bars, Breadcrumbs, and more in apps.

The Link component renders a standard HTML hyperlink (anchor element), providing all the standard browser behavior around links such as

  • Cmd/Ctrl + Click to open in new tab
  • Right-click context menu to open in new tab, copy link URL, etc
  • Link previews in browser
Example of a link component.

For conveninece, Superblocks provides out-of-the-box configurations to style the Link as a standard hyperlink or as a Primary, Secondary, or Tertiary button. These presets simply apply the relevant styling properties to the Link component in the properties panel.

Component Properties

PropertyDescription
TextThe text that will be displayed for the Link
Link toWhere you would like to link to. You can link to another Page in the App, another App, or any external URL
PageSelect the page to link to in this app. Only present when you've selected to link to a page.
URLProvide the URL to link to. Only present when you've selected to link to a URL.
Deployed appSelect another deployed app in your organization to link to. Only present when you've selected to link to a deployed app.
Route parametersSpecify values for any route parameters required by the page you are linking to. Only relevant when linking to a page that has a dynamic route.
Query parametersSpecify any query parameters to be included in the URL. Only relevant when linking to a page or app (when linking to a URL, simply supply query parameters directly in the URL)
Keep existing query parametersWhen enabled, new query params are merged with any existing query params. When disabled, existing query params will be discarded
Open in new tabOpens the link in a new tab. When disabled, users will still be able to open in new tab using Command/Ctrl + Click or the browser-provided right-click context menu
Link styleSelect a preset styling configuration for the Link to display it as a Link or a Button
IconSelect an icon to be displayed beside the link text
Icon positionSpecify whether the icon should be displayed left or right of the text
Text alignmentSet the horizontal alignment of the text relative to the width of the component
Text styleSet the typography of the link text
BackgroundSet the background color of the Link
BorderSet the border color and border width of the Link
Border radiusSet the border radius of the Link
Loading animationControls whether the Link should display a loading animation when a dependent API is running
PaddingControls the space between the link text and the border of the component
WidthControls the width of the component
HeightControls the height of the component
VisibleControls whether the component is visible
Collapse when invisibleWhen enabled, other components shift to occupy the space left by the invisible component / area
DisabledControls whether the component is enabled or disbaled

Reference Properties

Properties can be accessed from other frontend components and backend APIs by adding the name of the Link component, and dot referencing the property. For a Link named Link1:

PropertyDescription
Link1.isVisibleReturns whether the Link is visible
Link1.textReturns the text of the Link
Link1.isDisabledReturns whether the Link is disabled