Buttons are interactive elements that allow the user to perform an action on the page or serve as a prominent hyperlink.
The button component is built with the native HTML <button> tag. When used as a link, its tag becomes <a>.
Using HTML elements under the hood ensures that Button maintains its inherent interactivity and accessible roles for assistive technology.
| Element | Attribute | Description |
|---|---|---|
| Disabled button | aria-disabled | Set to true when the button is disabled. While disabled, the button will not be announced. |
| Key | Function |
|---|---|
| Enter/Space | Simulates a click and activates the button. |
| Tab | Moves focus to the next focusable element. |
| Shift+Tab | Moves focus to the previous focusable element. |