Change log
Components
Button
- Overview
- Usage
Overview
When to use
Use buttons when a user might need to perform an action, such as:
- Submitting a form
- Specify a next or previous step in a process
- Begin a new task
When not to use
In general, don't use a <button> in place of a link (<a>) or a link in place of a button. HTML buttons and links are treated differently by assistive technologies such as screen readers, so using the wrong one can make experiences harder to use for some people.
Button vs Link​
Button styling can be applied to either <button> or <a> elements.
Buttons are for actions that affect something on the current page, such as submitting a form, playing media, or closing a modal.
Links navigate to a new page or anchor location, changing the URL.