Skip to content

feat(#3504): Add "text" type to Button#3895

Open
bdfranck wants to merge 1 commit intodevfrom
benji/3504-text-button
Open

feat(#3504): Add "text" type to Button#3895
bdfranck wants to merge 1 commit intodevfrom
benji/3504-text-button

Conversation

@bdfranck
Copy link
Copy Markdown
Collaborator

@bdfranck bdfranck commented Apr 30, 2026

This PR adds a new "Text" type to the Button component. It aligns with the current Figma components. It requires the new tokens from GovAlta/design-tokens#156.

It includes the following changes:

  • Works with existing states: disabled, destructive, and inverse
  • Works with leading and trailing icons
  • Adds "dark" variant
    • Works only with "text" type
    • Shows a console warning when "dark" is used with another type
  • Adds "deprecated" warning to LinkButton in console and JSDocs
  • Includes a design token for "text decoration" to remove the underline, if needed

Decisions

  • The ticket had differing opinions on the underline so I chose the following approach:

    • Always show an underline
    • Use a design token so teams can remove the underline
    • Don't add a property for the underline
  • I kept the 100% width for text buttons on a mobile breakpoint.

Let me know if you have any questions or comments about these decisions.

Screenshots

image
focus-states

@bdfranck bdfranck linked an issue Apr 30, 2026 that may be closed by this pull request
@bdfranck bdfranck changed the title feat(#3504): Add text type to button feat(#3504): Add "text" type to Button Apr 30, 2026
@bdfranck bdfranck force-pushed the benji/3504-text-button branch from dc6c71e to c3ce488 Compare April 30, 2026 18:15
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://GovAlta.github.io/ui-components/pr-preview-angular/pr-3895/

Built to branch gh-pages at 2026-04-30 21:35 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

Preview links

Target URL
Docs https://govalta.github.io/ui-components/pr-preview/pr-3895/
React playground https://govalta.github.io/ui-components/pr-preview-react/pr-3895/
Angular playground https://govalta.github.io/ui-components/pr-preview-angular/pr-3895/

Built from commit 27a7b63. Previews are removed automatically when this PR closes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new "text" visual style option to the Button component family (web component + Angular/React typings/docs), and includes PR demo routes to showcase the new variant.

Changes:

  • Extend Button type to include "text" in the web component and shared GoabButtonType.
  • Add v2 CSS styling for button.v2.text (including destructive/inverse/disabled + compact adjustments).
  • Update Angular/React wrapper prop docs and add Angular/React PR showcase routes for feature #3504.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libs/web-components/src/components/button/Button.svelte Accepts type="text" and adds v2-only CSS for the new text button style.
libs/react-components/src/lib/button/button.tsx Updates prop JSDoc to document the new "text" type.
libs/angular-components/src/lib/components/button/button.ts Updates prop JSDoc to document the new "text" type.
libs/common/src/lib/common.ts Extends GoabButtonType union to include "text".
apps/prs/react/src/routes/features/feat3504.tsx Adds a React demo page showcasing text button variants.
apps/prs/react/src/app/routes/features/feat3504-text-button.route.ts Registers the React demo route in the PR routes manifest.
apps/prs/angular/src/routes/features/feat3504-text-button/feat3504.route.json Adds Angular PR-route metadata for the demo.
apps/prs/angular/src/routes/features/feat3504-text-button/feat3504.component.ts Adds the Angular standalone component for the demo page.
apps/prs/angular/src/routes/features/feat3504-text-button/feat3504.component.html Adds the Angular demo template showcasing text button variants.

Comment thread libs/web-components/src/components/button/Button.svelte
Comment thread libs/web-components/src/components/button/Button.svelte
Comment thread apps/prs/react/src/routes/features/feat3504.tsx Outdated
@bdfranck bdfranck force-pushed the benji/3504-text-button branch from 1ef29b6 to 1a60dc9 Compare April 30, 2026 18:57
@bdfranck bdfranck marked this pull request as ready for review April 30, 2026 19:04
@bdfranck bdfranck marked this pull request as draft April 30, 2026 19:05
@bdfranck bdfranck force-pushed the benji/3504-text-button branch from 1a60dc9 to 2498737 Compare April 30, 2026 19:37
@bdfranck bdfranck marked this pull request as ready for review April 30, 2026 19:57
@bdfranck bdfranck force-pushed the benji/3504-text-button branch 2 times, most recently from ce58873 to 236851f Compare April 30, 2026 20:28
@bdfranck
Copy link
Copy Markdown
Collaborator Author

The changes look good in the latest version of Safari...

image

@bdfranck
Copy link
Copy Markdown
Collaborator Author

bdfranck commented Apr 30, 2026

The changes look good in the latest version of Firefox...

image

@bdfranck
Copy link
Copy Markdown
Collaborator Author

The changes look good on the latest version of Chrome...

image

@bdfranck
Copy link
Copy Markdown
Collaborator Author

bdfranck commented Apr 30, 2026

It looks good on the latest Safari on iOS...

image

@bdfranck
Copy link
Copy Markdown
Collaborator Author

bdfranck commented Apr 30, 2026

It looks good on the latest version of Chrome on Android...

image

@bdfranck bdfranck linked an issue Apr 30, 2026 that may be closed by this pull request
10 tasks
@bdfranck bdfranck force-pushed the benji/3504-text-button branch 2 times, most recently from 68d4dc3 to d98e767 Compare April 30, 2026 21:16
@bdfranck
Copy link
Copy Markdown
Collaborator Author

I've added a non-text button with a "dark" variant to the PR pages to test the console warning.

image

@bdfranck bdfranck force-pushed the benji/3504-text-button branch from d98e767 to 27a7b63 Compare April 30, 2026 21:32
Copy link
Copy Markdown
Collaborator

@willcodeforcoffee willcodeforcoffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Great job.
I like the transparent background for inverse. The padding on the Inverse threw me off at first, until I realized it was the container.
This looks great! 🙂

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.

Link button refinements Button: Add "Text" type and deprecate Link-Button

3 participants