Skip to content

Add success and error state color utilities #4098

Description

@maya

Is your feature request related to a problem? Please describe.
There are no utilities for state colors, specifically: error and success. It's needed for custom UIs that need states, form iconography, etc.

Describe the solution you'd like
Add success and error state color tokens for text and background color:

  • .text-success
  • .text-error
  • .bg-success
  • .bg-error

If you prefer to make these a setting to turn these on, that's fine too. e.g. looks like there are emergency color utilities now but it's not something I'd likely use (it's so specific) and would be fine if it was off.

Describe alternatives you've considered

  • I've added these manually to multiple projects in my custom Sass
  • Using red and green color tokens but the colors are different from states

Additional context

  • There are a lot of state colors, but I think error and success is good enough
  • Note: Add documentation that the error state color could be alarmist and only use when intended.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions