Skip to content

fix(tabs): wrap static icon elements with tab-icon class for spacing#8073

Open
ggdouglas wants to merge 1 commit intodevelopfrom
gd/tabs-static-icon-styling
Open

fix(tabs): wrap static icon elements with tab-icon class for spacing#8073
ggdouglas wants to merge 1 commit intodevelopfrom
gd/tabs-static-icon-styling

Conversation

@ggdouglas
Copy link
Copy Markdown
Contributor

@ggdouglas ggdouglas commented Apr 17, 2026

Summary

Tabs lost the bp6-tab-icon spacing class when icon was a JSX element, because <Icon> returns elements as-is. Wrap element icons in a <span class="bp6-tab-icon"> so their spacing matches string icons.

This was discovered during research on #8065

Code

import { Tab, Tabs } from "@blueprintjs/core";

// dynamic
<Tabs>
    <Tab id="home" icon="home" title="Home" panel={<div>Home</div>} />
</Tabs>
import { Tab, Tabs } from "@blueprintjs/core";
import { Home } from "@blueprintjs/icons";

// static
<Tabs>
    <Tab id="home" icon={<Home />} title="Home" panel={<div>Home</div>} />
</Tabs>

Screenshots

Before After
tabs-before tabs-after

Diff

tabs-diff

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 17, 2026

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

fix(tabs): wrap static icon elements with tab-icon class for spacing

Check the box to generate changelog(s)

  • Generate changelog entry

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 17, 2026

Successfully generated changelog entry!

Need to regenerate?

Simply interact with the changelog bot comment again to regenerate these entries.


📋Changelog Preview

🐛 Fixes

  • fix(tabs): wrap static icon elements with tab-icon class for spacing (#8073)

@blueprint-previews
Copy link
Copy Markdown

fix(tabs): wrap static icon elements with tab icon class for spacing

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant