actions/DSLink
DSLink
actionsText link with primary color and optional underline.
iOSmacOS
Purpose
Use for navigation links, inline actions, or secondary CTAs. Lighter weight than buttons.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| titlereq | String | — | Link text |
| size | DSLinkSize | .md | Text size: .sm, .md, or .lg |
| isUnderlined | Bool | true | Show underline decoration |
| accessibilityLabel | String? | nil | Optional 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