---
updatedAt: 2026-06-12T07:29:13.000Z
agentTools:
  projectIndex: https://doc.superannotate.com/llms.txt
---

# Button

## **Button**

This button is a simple component that can be programmed to respond in any given way when clicked.

### Parameters

* `Label` - A switch to enable or disable the adding of a text to the button. If disabled, `Icon` will automatically be enabled.
* `Icon` - A switch to enable or disable the adding of an icon to the button (recommended). If disabled, `Label` will automatically be enabled.
* `Add info icon` - Disabled by default. When enabled, it shows a tooltip icon on the component. The tooltip shows text that can be entered in the component’s properties.
* `Horizontal alignment` - You can align the button to the **Left**, **Center**, or **Right**.

### Related Functions

* `disable(path: List[Union[str, int]])` - Disables the component.
* `enable(path: List[Union[str, int]])` - Enables the component.
* `setloading(value: boolean, path: List[Union[str, int]])` - Sets the component to a loading state.

### Related Events

* `on_<component id>_click(path: List[Union[str, int]]):` - Fired when the button is clicked.

![playground primary button](https://files.readme.io/a921dc7-button-component.gif "button-component.gif")

<HTMLBlock>{`
<a href="https://llm.superannotate.com/editor?url=https://github.com/superannotateai/custom-llm/blob/main/documentation/examples/button.json" target="_blank">Try in Playground</a>
`}</HTMLBlock>

## **Run Model**

This button can be integrated with a model connected to your team and then used to run basic or advanced prompts. Read more about using this component with group components <Anchor label="here" target="_blank" href="https://doc.superannotate.com/docs/run-model-grouping">here</Anchor>.

### Parameters

* `Model` - A dropdown list of connected models in the team.
* `Advanced prompt` - Disabled by default. A switch to enable or disable adding advanced prompts to your button. This alters how the `Model input` works.
* `Model input` - A dropdown list of any input components (must be Text Input) in the form. If `Advanced prompt` is enabled, then this becomes an input field where you can write up a prompt and inject other components’ values by using `{component_ID}` (can be Select, Checkbox, Radio, Voting, Rating, Slider).
* `Model output` - A dropdown list of applicable output components in the form. The components can only be: **Text Input**, **Text Area**, **Markdown**, **Code**, **Paragraph**, or **Web** for text value, and **Number**, **Slider**, **Rating**, or **Voting** for numeric value.
* `Label` - A switch to enable or disable the adding of a text to the button. If disabled, `Icon` will automatically be enabled.
* `Icon` - A switch to enable or disable the adding of an icon to the button (recommended). If disabled, `Label` will automatically be enabled.
* `Add info icon` - Disabled by default. When enabled, it shows a tooltip icon on the component. The tooltip shows text that can be entered in the component’s properties.
* `Horizontal alignment` - You can align the button to the Left, Center, or Right.

> 📘 Regarding numeric outputs (Number, Slider, Rating, or Voting)
>
> Along with the prompt, we also send a JSON schema as a response structure that the model should follow. The JSON schema includes:
>
> * type ("number" and "null")
> * minimum (if the component has a set min value)
> * maximum (if the component has a set max value)
>
> The structured output works only for models that support tool use.

### Related Functions

* `disable(path: List[Union[str, int]])` - Disables the component.
* `enable(path: List[Union[str, int]])` - Enables the component.
* `setloading(value: boolean, path: List[Union[str, int]])` - Sets the component to a loading state.
* `runAgents()` - When fired, runs the corresponding model with any given prompts or parameters. <Anchor label="Learn more" target="_blank" href="https://doc.superannotate.com/docs/run-agents-function">Learn more</Anchor>

## Related Events

* `on_<component id>_click(path: List[Union[str, int]])` - Fired when the button is clicked.

<Image align="center" src="https://files.readme.io/bd96fba0f5c0988a4ae8b6cf37e53f5616e73b6bcbbcc18a1da5a863111639cb-run-model-component.gif" />

## **Link**

This button allows you to incorporate any given link to be opened when clicked.

### Parameters

* `URL` - You can provide the URL that you want the button to redirect to.
* `Label` - A switch to enable or disable the adding of a text to the button. If disabled, Icon will automatically be enabled.
* `Icon` - A switch to enable or disable the adding of an icon to the button (recommended). If disabled, **Label** will automatically be enabled.
* `Add info icon` - Disabled by default. When enabled, it shows a tooltip icon on the component. The tooltip shows text that can be entered in the component’s properties.
* `Horizontal alignment` - You can align the button to the **Left**, **Center**, or **Right**.
* `Exclude from annotation JSON` - If checked, this component and its values will be excluded from the item’s annotation JSON. You also won’t be able to upload data for it.

### Related functions

* `sa.enable(path: list[tuple[str, int]])` - Enables the component.
* `sa.disable(path: list[tuple[str, int]])` - Disables the component.
* `sa.getValue(path: list[tuple[str, int]])` - Returns the data of the component.
* `sa.setValue(path: list[tuple[str, int]], value: str)` - Sets the data of the component.