vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Badge variants

Open ninarojc1 opened this issue 1 year ago • 7 comments

Badge https://vanillaframework.io/docs/patterns/badge

I used badges and I got a couple of comments that they are hard to read. Can we adjust them to improve the readability of the numbers?

We would also need more variants in color, like blue (link) and muted black. Screenshot 2024-08-07 at 09 59 15

ninarojc1 avatar Aug 07 '24 07:08 ninarojc1

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-13927.

This message was autogenerated

The idea is valid. @mattea-turic to look at the accessibility of the component (font weight and spacing). App mafia will discuss the use of status labels v. badges.

danielmutis avatar Aug 07 '24 09:08 danielmutis

I'd also love to see more variants. Basically I'd love to use the color coding chips have for badges as well (https://vanillaframework.io/docs/patterns/chip#colour-coding). In my case I am using badges to show how many tasks of an ansible run are ok/failed/changed: image

apollo13 avatar Oct 02 '24 15:10 apollo13

Design system contribution meeting:

  • Vertical spacing is addressed by a bug fix in #5569 horizontal padding we agree should be increased (0.375rem).
  • In the design system contribution meeting we think that the font weight is ok like it is currently.
  • In the design system contribution meeting we agree that we should have semantic colors for badges.

Tier: Global Priority: Medium

dgtlntv avatar Jul 09 '25 09:07 dgtlntv

I am currently implementing semantic badge colors in Pragma here - if we need it in Vanilla we can use this as reference. https://github.com/canonical/pragma/pull/302

jmuzina avatar Aug 18 '25 22:08 jmuzina

@ninarojc1 @dgtlntv Can I find the semantic-colored badge variants anywhere in Figma? It will help me document this component in SHI.

jmuzina avatar Aug 20 '25 12:08 jmuzina

Implemented in Pragma (PR, Demo)

jmuzina avatar Sep 29 '25 21:09 jmuzina