Skip to content

Comments

feat: enhance Tag component with icon support and custom nodes#421

Open
sverg-cb wants to merge 2 commits intomasterfrom
sverg/tag-icons
Open

feat: enhance Tag component with icon support and custom nodes#421
sverg-cb wants to merge 2 commits intomasterfrom
sverg/tag-icons

Conversation

@sverg-cb
Copy link
Contributor

@sverg-cb sverg-cb commented Feb 23, 2026

What changed? Why?

  • Added support for start and end icons in the Tag component.
  • Introduced props for custom start and end nodes.
  • Updated stories/docs to demonstrate new icon and custom node functionality.
  • Added tests to verify rendering of icons and custom nodes.

Note

The goal is for the implementation to be consistent with those in the Button files.

Root cause (required for bugfixes)

UI changes

Scenario Screenshot
iOS Storybook Simulator Screenshot - iPhone 16e - 2026-02-23 at 13 37 36
Android Storybook Screenshot_1771885558
Web Storybook Screenshot 2026-02-23 at 1 39 01 PM Screenshot 2026-02-23 at 1 39 10 PM
Mobile Docs Screenshot 2026-02-23 at 1 40 20 PM
Web Docs Screenshot 2026-02-23 at 1 41 22 PM

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Feb 23, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

- Added support for start and end icons in the Tag component.
- Introduced props for custom start and end nodes.
- Updated stories to demonstrate new icon and custom node functionality.
- Added tests to verify rendering of icons and custom nodes.
background="bg"
borderRadius={tagBorderRadiusMap[intent]}
dangerouslySetBackground={backgroundColor}
flexDirection="row"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: are we able to move 'row' to be inside of the props destructuring, like we have alignItems and justifyContent?

active={startIconActive}
dangerouslySetColor={color}
name={startIcon}
paddingEnd={0.5}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have this as 'gap' on Box instead? I could see that benefiting customers who use start instead of startIcon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good q. I was unsure about this because the mobile Button doesn't do this even though the Web one does. Should this be addressed in the mobile button as well? I think that whatever we do, we should keep the 2 consistent.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, we likely should switch it as well on Button, but would want to be careful to see if there was any reason.

Button is more complex since we have the block format where the icons stay on the edges while the label is in the middle

image

We can look at it separately, but would want to test it out in a few spots. We could maybe have a ticket to fix it in the v9 branch, I know v9 already has some changes in place to button to allow height customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants