actions/DSLink

DSLink

actions
since 1.2.0

Text link with primary color and optional underline.

iOSmacOS

Purpose

Use for navigation links, inline actions, or secondary CTAs. Lighter weight than buttons.

Props

PropTypeDefaultDescription
titlereqStringLink text
sizeDSLinkSize.mdText size: .sm, .md, or .lg
isUnderlinedBooltrueShow underline decoration
accessibilityLabelString?nilOptional accessibility label
actionreq(() -> Void)Tap action

Examples

Inline link

Link within text content.

swift
HStack {
    Text("Read our")
    DSLink("Privacy Policy", size: .md) {
        showPrivacyPolicy = true
    }
}

Navigation link

Link without underline for navigation.

swift
DSLink("View all projects",
    size: .sm,
    isUnderlined: false
) {
    navigate(to: .projects)
}

Usage Guidelines

  • Use underlined links within text content for clarity
  • Remove underline for standalone navigation links
  • Keep link text descriptive and action-oriented
  • Use appropriate size relative to surrounding text

Related Components