button type
The type attribute of an HTML button: submit (the default inside a form), button (does nothing by itself) or reset.
In more detail
A button with no type inside a form submits the form, which can reload the page unexpectedly. Design system buttons therefore default to type="button" and require callers to ask for submit explicitly.
Related terms
- HTML — The markup language that describes the structure and meaning of a web page with elements such as <button>, <input> and <h2>.
- form control — An element that collects user input, such as a text input, checkbox, switch, select or button.
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering
- Actionable Form Primitives: Buttons, Switches & Inputs — Design Systems & Component Engineering