Links

Links allow you to navigate normally or open new tabs from within a table cell. They are defined using the `[link]` token.

Syntax

STL
[link text="Label" href="/url" newTab="true"]

Attributes

  • `text` (required): The link text displayed to the user.
  • `href` (required): The destination URL.
  • `newTab` (optional): Set to "true" to open in a new tab (`target="_blank"`).
Example
STL
#table cols: 2 [header] Resource | Link [body] Documentation | [link text="Read Docs" href="/docs"] GitHub Repo | [link text="View Code" href="https://github.com" newTab="true"]

How Links Work

Links in the Structured Table Library render as standard anchor (`<a>`) elements with proper styling.

  • Standard Navigation: By default, links navigate within the same tab.

  • New Tab: When `newTab="true"` is set, the link opens in a new browser tab with `rel="noopener noreferrer"` for security.

Sanity Table LogoStructured Tables
Fast, free and open source.
Write in STL (Structured Table Language), render anywhere.

Open Source under MIT License