Structure
OUDSLink
Link is a UI element that allows to navigate from one location to another, either within the same page or across different pages in the same resource, or to an external resource. Link’s primary function is navigation and it communicates its interactive nature visually and semantically.
- iOS 15.0+
- macOS 13.0+
- tvOS 16.0+
- visionOS 1.0+
- watchOS 11.0+
@MainActor struct OUDSLink
Mentioned In
Overview
The OUDSLink proposes layout with text only or text with icon. It also proposes layout to navigate forward or backward. The link can be displayed in small or default size.
Text only or Text and icon layout
This layout is used to open a link or to display a specific feature (like send feedbacks, show more, …)
// Text only in small size
OUDSLink(text: "Feedback", size: .small) { /* the action to process */ }
// From a localizable and a bundle
OUDSLink(LocalizedStringKey("feedback_link"), bundle: Bundle.module, size: .small) { }
// Text and icon in default size
OUDSLink(text: "Feedback", icon: Image("ic_heart"), size: .default) { /* the action to process */ }
Navigation layout
This layout is used to navigate backward or forward.
// Navigate to next page with link in a small size
OUDSLink(text: "Feedback", indicator: .next, size: .small) { /* the action to process */ }
// Navigate to previous page with link in a default size
OUDSLink(text: "Back", indicator: .back, size: .default) { /* the action to process */ }
Colored Surface
If link is placed on colored surface using OUDSColoredSurface, the default colors (content text and icon or arrow) are automatically adjusted to switch to monochrom.
Design documentation
unified-design-system.orange.com
Themes rendering
Orange

Orange Compact

Sosh

Wireframe

Version
2.2.0 (Figma component design version)
Since
0.11.0
Topics
Initializers
init(LocalizedStringKey, tableName: String?, bundle: Bundle, icon: Image?, size: OUDSLink.Size, action: () -> Void)Creates a link with a localized text and optional icon, looking up the key in the given bundle.
init(LocalizedStringKey, tableName: String?, bundle: Bundle, indicator: OUDSLink.Indicator, size: OUDSLink.Size, action: () -> Void)Creates a link with a localized text and a navigation indicator, looking up the key in the given bundle.
init(text: String, icon: Image?, size: OUDSLink.Size, action: () -> Void)Create a link with text and icon.
init(text: String, indicator: OUDSLink.Indicator, size: OUDSLink.Size, action: () -> Void)Create a link with a “before Indicator” (OUDSLink.Indicator.back) or “after indicator” (OUDSLink.Indicator.next) beside the text.
Instance Properties
Enumerations