Button
On this page
Overview
A button is clickable text or an icon that triggers an action on the page or in the background. Depending on the action, content, and hierarchy, a button can be used on its own or grouped with other buttons.
Edit element properties
import '@rhds/elements/rh-button/rh-button.js';
<rh-button>Primary</rh-button>
Disables the button
button type
Accessible name for the button, use when the button does not have slotted text
Form value for the button
Form name for the button
Shorthand for the icon
slot, the value is icon name
Icon set for the icon
property - 'ui' by default
Changes the style of the button.
- Primary: Used for the most important call to action on a page. Try to limit primary buttons to one per page.
- Secondary: Use secondary buttons for general actions on a page, that don’t require as much emphasis as primary button actions. For example, you can use secondary buttons where there are multiple actions, like in toolbars or data lists.
- Tertiary: Tertiary buttons are flexible and can be used as needed.
Use danger buttons for actions a user can take that are potentially destructive or difficult/impossible to undo, like deleting or removing user data.
Status
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Ready
When to use
- When you need to allow users to interact with pages in a variety of ways
- When you need to communicate actions users can take
- When you need to draw attention to the highest priority action
Status checklist
Property | Status | Meaning |
---|---|---|
Figma library |
|
Component is available in the Figma library |
RH Elements |
|
Component is available in the RH Elements repo |
RH Shared Libs |
|
Component is available in the RH Shared Libs repo |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.