Toggle Link
A text link to toggle a boolean value. It supports caret, sign, and arrow icons that change based on the value, and can show or hide text underline.
Properties
Available properties for Toggle Link with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
The current value.
Whether content can wrap to multiple lines.
Whether user input, interaction, or selection is disabled.
Whether the component is visible.
The horizontal alignment of the contents.
The position of the icon relative to the label.
The icons to display.
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
.
Whether to underline the content.
The primary text content.
The text to display in a tooltip on hover or focus.
The style of the underline.
Events
Events are triggered by user interactions with Toggle Link. Use event handling to trigger queries or other actions in response to events.
A user changes the current value.
A user sets the current value to false
.
A user sets the current value to true
.
Methods
Methods for interacting with Toggle Link. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Set the current value.
Toggle the current value between true
and false
.
Clear the current value.
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.
Reset value
to the default value.