Button
On this page
Overview
Triggers actions via click, Enter, or Space. USE variant to set
hierarchy: primary (SHOULD limit one per page), secondary, tertiary,
or danger. Renders a native <button> with delegatesFocus for
keyboard access. MUST use label for icon-only buttons to set the
ARIA accessible name. Supports form association (submit/reset).
Edit element properties
import '@rhds/elements/rh-button/rh-button.js';
<meta itemprop="description" content="Default primary button demonstrating base button usage and styling.">
<rh-button>Primary</rh-button>
import { Button } from "@rhds/elements/react/rh-button/rh-button.js";
// NOTE: React 19+ does not require these wrapper imports.
// You can use the custom elements directly as-is.
export const Demo = () => (
<meta itemprop="description" content="Default primary button demonstrating base button usage and styling." />
<Button>Primary</Button>
);
Disables the button, preventing user interaction. When true, the button
receives aria-disabled="true" and pointer events are suppressed.
Disabled buttons are excluded from tab order unless aria-disabled is
used instead of disabled. Defaults to false.
Controls the button's behavior within a form context. Accepts 'button' (no default form behavior), 'submit' (submits the form), or 'reset' (resets form fields). When omitted, defaults to implicit submit behavior.
Accessible name for the button, applied as aria-label on the internal
<button>. USE when the button has no visible text (e.g. icon-only
buttons like close or play). When set, slotted text is hidden with
aria-hidden="true". Defaults to undefined.
Form value submitted with the button when it triggers form submission.
Paired with name to create a name/value pair. Defaults to undefined.
Form name for the button, used with value to submit data when the
button triggers form submission. Defaults to undefined.
Shorthand for the icon slot. Accepts an icon name from the specified
icon set (defaults to 'ui'). When set, renders an <rh-icon> in the
icon slot. SHOULD use micron icons for best fit. Defaults to undefined.
Icon set for the icon property. Accepts any registered icon set name.
Defaults to 'ui' when not specified. USE 'microns' for small inline icons.
Controls the visual hierarchy and style of the button. Accepts ‘primary’ | ‘secondary’ | ‘tertiary’ | ‘close’ | ‘play’. Defaults to ‘primary’. SHOULD limit primary to one per page. USE secondary for general actions, tertiary for low-emphasis actions. Close and play variants render icon-only circular buttons with visually hidden text.
Applies danger styling for destructive or irreversible actions like
deleting data. Combines with variant to produce danger-primary or
danger-secondary styles. AVOID using for non-destructive actions.
Defaults to false.
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 RH Elements |
| RH Shared Libs |
|
Component is available in RH Shared Libs |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.