Button
Buttons are basic interface elements that initialize an action or function when the user interacts with them. The appearance of the button should suggest the user takes an action that leads to different scenarios. These elements that reinforce to the user the necessity to interact are called CTA (Call to Action) components, which basically are designed to capture user attention and improve the user experience within the application.
The states are the different behaviors of the button component based on the interaction of the user. For the desktop version, we contemplate five different states by which can pass.
States: enabled, hover, focus, active and disabled.
Component token | Element | Core token | Value |
---|---|---|---|
primaryBackgroundColor | Button container | color-purple-700 | #5f249f |
primaryFontColor | Label | color-white | #ffffff |
primaryHoverBackgroundColor | Container fill:hover | color-purple-800 | #4b1c7d |
primaryActiveBackgroundColor | Container fill:active | color-purple-900 | #321353 |
primaryDisabledBackgroundColor | Container fill:disabled | color-grey-100 | #f2f2f2 |
primaryDisabledFontColor | Label:disabled | color-grey-500 | #999999 |
primaryFocusBorderColor | Container border:focus | color-blue-600 | #0095ff |
Component token | Element | Core token | Value |
---|---|---|---|
secondaryBackgroundColor | Container fill | color-transparent | transparent |
secondaryFontColor | Label | color-purple-700 | #5f249f |
secondaryBorderColor | Container border | color-purple-700 | #5f249f |
secondaryHoverBackgroundColor | Container fill:hover | color-purple-700 | #5f249f |
secondaryHoverFontColor | Label:hover | color-white | #ffffff |
secondaryActiveBackgroundColor | Container fill:active | color-purple-900 | #321353 |
secondaryDisabledBackgroundColor | Container fill:disabled | color-transparent | transparent |
secondaryDisabledFontColor | Label:disabled | color-grey-500 | #999999 |
secondaryFocusBorderColor | Container border:focus | color-blue-600 | #0095ff |
secondaryDisabledBorderColor | Container border:disabled | color-grey-500 | #999999 |
Component token | Element | Core token | Value |
---|---|---|---|
textBackgroundColor | Container fill | color-transparent | transparent |
textFontColor | Label | color-purple-700 | #5f249f |
textHoverBackgroundColor | Container fill:hover | color-purple-100 | #f2eafa |
textActiveBackgroundColor | Container fill:active | color-purple-200 | #e5d5f6 |
textDisabledBackgroundColor | Container fill:disabled | color-transparent | transparent |
textDisabledFontColor | Label:disabled | color-grey-500 | #999999 |
textFocusBorderColor | Container border:focus | color-blue-600 | #0095ff |
- Understanding WCAG 2.2 - 2.4.7: Focus Visible
- Understanding WCAG 2.2 - 3.2.2: On Input
- WAI-ARIA Authoring Practices Guide (APG) - Button Pattern