components icon indicating copy to clipboard operation
components copied to clipboard

[Feature Request]: Separate colours for destructive operations for components like Button

Open kamaz opened this issue 1 year ago • 3 comments

Description

I was wondering if it's possible to configure a separate color for destructive operations. From what I understand, it seems impossible unless you duplicate the components you want to modify.

Is there an example of how to achieve this? Also, I think it would be beneficial to have this feature included in the core library. Having a distinct colour for destructive operations, like a Delete button, compared to non-destructive actions, such as a Save button, is a widely used design approach. It more effectively communicates the potential consequences of an action to users, enhancing their experience by providing clear visual cues and reducing the chances of accidental or unintended actions.

Example:

Screenshot 2023-05-26 at 14 36 08

Code of Conduct

kamaz avatar May 26 '23 13:05 kamaz

Hi kamaz, Thank you for reaching out. Currently it's not possible to give distinctive background colors to buttons in an out-of-the-box way. I’m not sure how beneficial it would be to provide distinctive colors for destructive operations. If you want to give an extra attention to the user for the destructive operations, you can do in different ways like inserting remove icon for delete, check icon for save while using our primary and secondary button like attached. Relying fully on colors creates an accessibility concern as well.

Screenshot 2023-05-30 at 15 58 36

at-susie avatar Jun 06 '23 12:06 at-susie

@at-susie thank you for clarifying the current limitations.

Do you have any suggestions on how it could be achieved distinctive background colors for buttons within the framework's scope? (happy with alternative options or workarounds)

kamaz avatar Jun 23 '23 09:06 kamaz

Applying a different background colour for a button is currently not supported in Cloudscape.

(Cloudscape has a theming functionality, but that changes the appearance of all buttons in the application).

connorlanigan avatar Jun 23 '23 13:06 connorlanigan