Button
Triggers actions or events, such as submitting forms, opening dialogs, or navigating to other pages. Use Button to let users perform specific tasks or initiate interactions throughout the interface. Buttons can also function as links, guiding users to internal or external destinations.
Anchor to propertiesProperties
A label that describes the purpose or contents of the Button. It will be read to users using assistive technologies such as screen readers.
Use this when using only an icon or the button text is not enough context for users using assistive technologies.
Sets the action the should take when this clickable is activated.
See the documentation of particular components for the actions they support.
--auto
: a default action for the target component.--show
: shows the target component.--hide
: hides the target component.--toggle
: toggles the target component.
ID of a component that should respond to activations (e.g. clicks) on this component.
See command
for how to control the behavior of the target.
Disables the button, meaning it cannot be clicked or receive focus.
Causes the browser to treat the linked URL as a download with the string being the file name. Download only works for same-origin URLs, or the blob: and data: schemes.
The URL to link to.
- If set, it will navigate to the location specified by
href
after executing theclick
event. - If a
is set, the
command
will be executed instead of the navigation.
Replaces content with a loading indicator while a background action is being performed.
This also disables the button.
Specifies where to display the linked URL.
Sets the tone of the Button, based on the intention of the information being conveyed.
The behavior of the button.
submit
: Used to indicate the component acts as a submit button, meaning it submits the closest form.button
: Used to indicate the component acts as a button, meaning it has no default action.reset
: Used to indicate the component acts as a reset button, meaning it resets the closest form (returning fields to their default values).
This property is ignored if the component supports href
or /
command
and one of them is set.
Changes the visual appearance of the Button.
Anchor to eventsEvents
Learn more about registering events.