Skip to content

feat(components): add underline prop to Link component#1888

Open
hsadhvani wants to merge 6 commits intomainfrom
devin/1777485480-link-underline-prop
Open

feat(components): add underline prop to Link component#1888
hsadhvani wants to merge 6 commits intomainfrom
devin/1777485480-link-underline-prop

Conversation

@hsadhvani
Copy link
Copy Markdown
Contributor

@hsadhvani hsadhvani commented Apr 29, 2026

Summary

Add an underline prop to the Link component 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 hover

This 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: Add underline as a CVA variant with always | hover | none values
  • Link.module.css: Add .underlineAlways, .underlineHover, .underlineNone classes
  • Link.spec.tsx: Add test for underline="always"
  • Link.stories.tsx: Add UnderlineAlways and UnderlineNone stories

Usage:

<Link href="/test" underline="always">View pending change</Link>
<Link href="/test" underline="none">No underline ever</Link>

Testing approaches

  • Unit tests added and passing
  • Biome lint passes
  • TypeScript check passes

Link to Devin session: https://app.devin.ai/sessions/e7f835e7f72f429da7490a51b5b334a2
Requested by: @hsadhvani


Note

Low Risk
Low risk: adds an optional styling prop to Link with a default matching existing hover-underline behavior, plus small CSS/story/test updates.

Overview
Adds an underline prop to Link ('always' | 'hover' | 'none') implemented as a new CVA variant, defaulting to 'hover' to preserve current behavior.

Updates Link.module.css with 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.

Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 29, 2026

🦋 Changeset detected

Latest commit: 199af92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@launchpad-ui/components Minor

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 29, 2026

yarn add https://pkg.pr.new/@launchpad-ui/components@1888.tgz
yarn add https://pkg.pr.new/@launchpad-ui/icons@1888.tgz
yarn add https://pkg.pr.new/@launchpad-ui/tokens@1888.tgz

commit: 02d01e8

Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
Comment thread packages/components/src/Link.tsx
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(components): add underline prop to Link component feat(components): add evident prop to Link component Apr 29, 2026
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(components): add evident prop to Link component feat(components): add underline variant to Link component Apr 29, 2026
Co-Authored-By: Harsh Sadhvani <hsadhvani@launchdarkly.com>
@devin-ai-integration devin-ai-integration Bot changed the title feat(components): add underline variant to Link component feat(components): add underline prop to Link component Apr 29, 2026
@hsadhvani hsadhvani marked this pull request as ready for review April 30, 2026 15:44
@hsadhvani hsadhvani requested a review from a team as a code owner April 30, 2026 15:44
@hsadhvani hsadhvani requested a review from zmdavis April 30, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants