Button
A button to trigger queries and other actions. It supports loading and disabled states, and solid and outline styles.
Properties
Available properties for Button with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
An accessible description of the component for screen readers.
Whether the component has an enabled Click event handler.
Whether user input, interaction, or selection is disabled.
Whether the height automatically resizes to fit content or is a fixed size.
Whether the component is visible.
The horizontal alignment of the contents.
The icon to display after the primary content.
The icon to display before the primary content.
The position of the loading indicator if loading
is true
.
Whether to display a loading indicator.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
Whether the component remains visible in the editor if hidden
is true
.
The current variant used to style the component.
Whether the button submits the form specified in submitTargetId
on click.
The form to submit when submit
is true
.
The primary text content.
The text to display in a tooltip on hover or focus.
Events
Events are triggered by user interactions with Button. Use event handling to trigger queries or other actions in response to events.
A user clicks the component.
Methods
Methods for interacting with Button. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.