mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.43k stars 32.16k forks source link

Support simple badges #22471

Open oliviertassinari opened 4 years ago

oliviertassinari commented 4 years ago

Summary πŸ’‘

Broaden the use cases supported by the Chip/Badge component, make it support the use cases of what most designers and developers associate with a "badge".

Examples 🌈

import { Chip } from '@material-ui/core';

<Typography variant="h3">
   Example heading
  <Chip size="xsmall" color="success">New</Badge>
</Typography>
Capture d’écran 2020-09-04 aΜ€ 01 30 42

Motivation πŸ”¦

Designers often display "badges" in a wide variety of contexts: table cell, side nav link, headline1 adornment, etc. The current Chip component tries to solve this problem, but it could likely be improved:

At the same time, we have a Badge component that supports a narrower use case for what most expect with what a "badge" is traditionally used for.

Benchmark

cam-cole commented 1 year ago

It appears that there is a good set of colors for standard use cases/contexts. Are there other cases for certain colors, or are more colors wanted for personalization such as for Avatar chips?