feat(components): add underline prop to Link component#1888
Open
hsadhvani wants to merge 7 commits into
Open
Conversation
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
🦋 Changeset detectedLatest commit: 0e3851c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
hsadhvani
commented
Apr 29, 2026
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
Contributor
Author
|
Following @zmdavis and @cchung-at-LD if we still want to do this |
Contributor
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an
underlineprop to theLinkcomponent following the MUI Link pattern. This gives consumers control over when a link is underlined.Values:
'hover'(default) — underline on hover only (current behavior, no breaking change)'always'— always underlined, even at rest'none'— never underlined, even on hoverThis addresses a need from the experimentation team where links on dark backgrounds (e.g. the experiment approval action bar) are indistinguishable from body text when semibold — and changing the link color fails contrast standards.
Changes:
Link.tsx: Addunderlineas a CVA variant withalways | hover | nonevaluesLink.module.css: Add.underlineAlways,.underlineHover,.underlineNoneclassesLink.spec.tsx: Add test forunderline="always"Link.stories.tsx: AddUnderlineAlwaysandUnderlineNonestoriesUsage:
Testing approaches
Link to Devin session: https://app.devin.ai/sessions/e7f835e7f72f429da7490a51b5b334a2
Requested by: @hsadhvani
Note
Low Risk
Additive API with backward-compatible default; styling-only changes to a shared UI component.
Overview
Adds an optional
underlineprop toLink('always' | 'hover' | 'none'), wired through CVA and new CSS classes so consumers can control underline at rest, on hover, or never.Default remains
'hover', matching existing.linkbehavior (no underline until hover).'always'forces underline at rest;'none'removes underline including on hover. Documented via changeset (minor), a render test forunderline="always", and Storybook stories for the new modes.Reviewed by Cursor Bugbot for commit 0e3851c. Bugbot is set up for automated code reviews on this repo. Configure here.