Example Usage

import zero_true as zt

# Create a Button component
sample_button = zt.Button(
  id="sample_button",
  color="primary",          # Color of the button
  disabled=False,           # If true, the button is disabled
  outlined=False,           # If true, the button will have an outlined style
  text="Click Me",          # Label displayed on the button
  triggerEvent="click",     # Trigger event to send code to the backend
  value=False               # Whether the button has been clicked
)

# Assuming you have a mechanism to render or use this Button within a layout
layout = zt.Layout(components=[sample_button])

Example Output

Overview

pydantic model zero_true.Button

The Button component is a fundamental element in user interfaces, offering a simple yet versatile method for user interaction. This standard button can be customized with different colors, labels, and styles such as outlined to match the design requirements of any application.

It supports enabling or disabling based on application logic, and its functionality extends to capturing clicks through event triggers that can be connected to backend processes. The straightforward implementation makes it an essential tool for initiating actions, submitting forms, or triggering events within a UI.

JSON Schema

Bellow are the various attributes you can assign to the component. Utlizing them can allow for modifications to the pre-created object.
zero_true.Button
Zero True Component

Methods

classmethod get_value_from_global_state(value, values)