Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Link
Link to Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=11550-242275&t=ftfrOGkPzlG2GaTo-1
Overview
- The Link Component is a versatile UI element used to create interactive links within applications.
- It supports customization with icons, tooltips, and multiple styling options.
- It is useful for creating navigation items, action links, or clickable text with indicators.
- The component helps guide users by combining text with visual and interactive cues.
...
- id – Specifies a unique identifier for the component used for programmatic access. For example, "detailsNavigationLink" enables targeted manipulation of this specific link through scripts or automated tests.
- dataTestId – Sets the testing hook ID for automated testing. For example, setting to "details-link" allows test scripts to reliably locate this component during automated testing.
- enableAsHotspot – Enables the component as a guided tour hotspot. When enabled, the link can be highlighted during onboarding or tutorial flows to draw user attention to important navigation options.
- guidedTourHotSpotTitle – Sets the title for the guided tour hotspot, supporting translations. For example, {"en-US": "Detail Navigation", "de-DE": "Detailnavigation"} provides clear identification during guided tours.
- guidedTourHotSpotDescription – Sets the description for the guided tour hotspot, supporting translations. For example, {"en-US": "Click here to view detailed information", "de-DE": "Klicken Sie hier, um detaillierte Informationen anzuzeigen"} provides detailed instructions during guided tours.
Guidelines
- Links should be easily distinguishable from regular text by using consistent styling such as color, underline, or icon indicators.
- Avoid using only color to indicate link state; combine it with another visual cue (e.g., underline or bold).
- Provide clear and descriptive link text so users understand the purpose without needing additional context.
- Use icons alongside text only when they add clarity to the link’s meaning or destination.
- Ensure tooltips and link text do not duplicate each other; tooltips should provide additional context.
Accessibility
...
Usage
- Use the Link for inline navigation or lightweight actions initiated by clicking text. Provide clear, localized text via
titleTranslationsand wire the action withON_LINK_CLICK. - Indicate the current location or selection by toggling
active: true. - Only disable links that should remain visible but non-interactive using
disabled; otherwise hide them usingvisibilityPolicySetIdordisplayConditions.
Sizing & Layout
- Adjust clickable comfort and spacing with
paddingClass. - Use
leftIcon/rightIconto add meaning while keeping the primary label intitleTranslations.
States & Feedback
- Supported visual states are default (enabled),
active, anddisabled. - Provide supplemental hover context via tooltips rather than changing the label on hover using
showTooltipandtooltipTextTranslations.
Tooltips
- Keep tooltips short, localized, and optional with
showTooltipandtooltipTextTranslations. - Position tooltips using
tooltipPlacement; add a modesttooltipDelayto reduce accidental reveals. - Do not place critical instructions only in the tooltip; ensure core meaning is in
titleTranslations.
Data-Driven / Conditional Behavior
- Show/hide the link with
displayConditions; keep conditions mutually exclusive to prevent flicker. - Gate clickability without hiding by binding to
authorizationDisable.
Visibility & Authorization
- Hide links entirely for unauthorized audiences via
visibilityPolicySetId. - Combine
visibilityPolicySetId(who sees) withauthorizationDisable(who can click) for precise control.
Content & Localization
- Write action-oriented, self-sufficient text (avoid “Click here”) and localize it with
titleTranslations. - For guided onboarding, opt into hotspots with
enableAsHotspot, and provideguidedTourHotSpotTitleandguidedTourHotSpotDescription.
Dos & Don’ts
| Do | Don’t | Article setting(s) |
|---|---|---|
| Use descriptive, localized text (e.g., “View details”). | Use vague labels (“Click here”, “More”). | titleTranslations |
Mark the current page with active: true. | Fake “current” styling via ad-hoc approaches. | active |
| Add an external indicator icon on the right. | Rely on color alone to imply “external”. | rightIcon, titleTranslations |
| Use tooltips for brief, optional context. | Put essential instructions only in a tooltip. | showTooltip, tooltipTextTranslations, tooltipDelay |
| Disable when users should see but not use. | Hide permission-blocked links users expect to see. | authorizationDisable |
| Hide sensitive links entirely. | Show sensitive links and count on disable alone. | visibilityPolicySetId |
| Drive visibility with conditions. | Leave obsolete links visible during state changes. | displayConditions |
| Wire actions to the click event. | Depend on unrelated components to trigger the action. | events, ON_LINK_CLICK |
| Provide a stable test hook. | Target links in tests by visible text only. | dataTestId |
| Use hotspots for onboarding callouts. | Overload tooltips for multi-step instructions. | enableAsHotspot, guidedTourHotSpotTitle, guidedTourHotSpotDescription |
Accessibility
- Convey state without color-only meaning by using
active/disabledand optional icons vialeftIcon/rightIcon. - When indicating special behaviors (e.g., external destinations), prefer adding an icon (
rightIcon) in addition to the descriptive text intitleTranslations. - Provide stable hooks for automated accessibility checks with
dataTestIdandid. - Localize guided-tour content so assistive tech announces accurate context using
guidedTourHotSpotTitleandguidedTourHotSpotDescription. - If you enable tooltips, ensure they are supplemental and short; rely on the visible label in
titleTranslationsfor the essential meaning.