Skip to content

Conversation

@prateekchachra-aily
Copy link
Contributor

@prateekchachra-aily prateekchachra-aily commented Nov 20, 2025

  • Add badgeBackgroundColor and badgeTextColor props to TabView
  • Implement badge styling in Android native code using Material BadgeDrawable API
  • Add support in @bottom-tabs/react-navigation wrapper
  • Colors are processed using processColor for proper color conversion
  • Android only feature (iOS uses system default badge styling)

PR Description

Adds support for customizing badge colors on Android tabs using the Material Design BadgeDrawable API.

How to test?

  • Set badge text and background colors using tabBarBadgeBackgroundColor and tabBarBadgeTextColor in screen options
  • Can be changed dynamically
  • Can be used with hex, named or rgba values

Screenshots

(Example with background color #1FA and text color white)
image


Note

Adds Android-only support to set tab badge background and text colors, with wiring through TabView and @react-navigation wrapper and theme fallbacks when unset.

  • Android native (RCTTabView.kt):
    • Apply badgeBackgroundColor and badgeTextColor on badges; reset to theme defaults (colorError, colorOnError) when unset.
  • Bottom Tabs (react-native-bottom-tabs):
    • TabView adds getBadgeBackgroundColor/getBadgeTextColor; values processed via processColor and passed in items.
    • Native component types (TabViewNativeComponent.ts) and route types (types.ts) extended with badge color fields.
  • React Navigation wrapper (react-navigation):
    • New screen options: tabBarBadgeBackgroundColor, tabBarBadgeTextColor.
    • NativeBottomTabView wires these options to TabView getters.

Written by Cursor Bugbot for commit 042f674. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 20, 2025

⚠️ No Changeset found

Latest commit: f99b0ae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

- Add badgeBackgroundColor and badgeTextColor props to TabView
- Implement badge styling in Android native code using Material BadgeDrawable API
- Add support in @bottom-tabs/react-navigation wrapper
- Colors are processed using processColor for proper color conversion
- Properly reset colors to theme defaults when props are removed (fixes stale color bug)
- Android only feature (iOS uses system default badge styling)
@prateekchachra-aily prateekchachra-aily force-pushed the feat/add-badge-color-support-android branch from e2af737 to 3f98bab Compare November 20, 2025 08:44
Copy link
Member

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

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

Thanks for creating this PR, can you also update the documentation with your changes?

@prateekchachra-aily
Copy link
Contributor Author

Thanks for creating this PR, can you also update the documentation with your changes?

Done, added the docs.

Copy link
Member

@okwasniewski okwasniewski left a comment

Choose a reason for hiding this comment

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

Thanks!

@okwasniewski okwasniewski added this pull request to the merge queue Nov 28, 2025
Merged via the queue into callstack:main with commit 3793cbb Nov 28, 2025
5 checks passed
@lovegaoshi
Copy link

since this PR is released with 1.0.3 im seeing a bunch of unresolved references with RN 0.81 and the data class TabInfo is indeed missing on these new references introduced in this PR

image image

@migueldaipre
Copy link

since this PR is released with 1.0.3 im seeing a bunch of unresolved references with RN 0.81 and the data class TabInfo is indeed missing on these new references introduced in this PR

image image

Same here. Build failing cc @okwasniewski

@prateekchachra-aily
Copy link
Contributor Author

@migueldaipre @lovegaoshi I can create a separate PR to add the references if need be, it never gave an error to me even while building

@lovegaoshi
Copy link

lovegaoshi commented Dec 3, 2025 via email

@migueldaipre
Copy link

The issue has been fixed in #482

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.

4 participants