Button

Button

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

Parameters

  • Button text - Text input indicating the button text.
  • 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

Run Model

This button can be integrated with a model connected to your team and then used to run basic or advanced prompts.

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 (must be Text Input).
  • 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.