microsoft / microsoft/fluentui

[Bug]: Badge not picking up fui-Badge classname

Open
#36,556 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Fluent UI react-components (v9) Type: Bug :bug:
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Component

Badge

Package version

9.74.5

React version

^18

Environment
N/A – seeing this on Storybook and Stackblitz.
Current Behavior
Image Image
Expected Behavior

Would expect the outline subtle and ghost subtle badges to not overflow their containers. It seems like the fui-Badge class is missing on those, and thus none of the badge styles are being applied

Reproduction

https://stackblitz.com/edit/p2ubjjvt?file=src%2Findex.tsx

Steps to reproduce

Go to stackblitz link or https://storybooks.fluentui.dev/react/?path=/docs/components-badge-badge--docs#color-and-appearance-1 and you should see the issue.

Are you reporting an Accessibility issue?

no

Suggested severity

High - No workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Badge component implementation and reproduce the issue using the provided StackBlitz or Fluent UI Storybook links. Trace how the outline subtle and ghost subtle variants receive their class names. Done means those variants pick up the fui-Badge styles and no longer overflow their containers in the reported examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.