Skip to content

[Chip] Custom color other than "primary" or "secondary" #21135

@lukefisklennon

Description

@lukefisklennon
  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Currently, the Chip component only supports "default", "primary" or "secondary" for the color value. To use custom colors (i.e. arbitrary hex), I can hack this with the background-color CSS for the default chip style. However, for the outlined variant, this is more difficult because it requires styling the text, border and icons in the chip. It would be better if the color value supported any chip colors.

Motivation 🔦

I'm using this in the autocomplete component, where selected items are color-coded (there's an arbitrary number of these colors).

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists.scope: chipChanges related to the chip.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions