feat(components): add underline prop to Link component#1888
Open
feat(components): add underline prop to Link component#1888
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: 199af92 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>
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
Low risk: adds an optional styling prop to
Linkwith a default matching existing hover-underline behavior, plus small CSS/story/test updates.Overview
Adds an
underlineprop toLink('always' | 'hover' | 'none') implemented as a new CVA variant, defaulting to'hover'to preserve current behavior.Updates
Link.module.csswith underline-specific classes, adds Storybook examples for the new options, and includes a basic unit test plus a changeset marking a minor version bump.Reviewed by Cursor Bugbot for commit 199af92. Bugbot is set up for automated code reviews on this repo. Configure here.