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.

Image of Danger, Primary, Secondary, Tertiary, and Link buttons in the first row and Play and Close buttons in the second row

Sample component



View a live version of this component and see how it can be customized.

<link rel="stylesheet" href="demo.css">
<script type="module" src="rh-button.js"></script>

<rh-button danger>Danger</rh-button>
<rh-button variant="link">Link</rh-button>
<rh-button variant="secondary">Secondary</rh-button>
<rh-button variant="secondary" danger>Secondary Danger</rh-button>
<rh-button variant="tertiary">Tertiary</rh-button>
<rh-button variant="close">Close</rh-button>
<rh-button variant="play">Play</rh-button>
<rh-button disabled>Disabled</rh-button>
View the <rh-button> demo in a new tab

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
© 2021-2023 Red Hat, Inc. Deploys by Netlify