import zero_true as zt# Create a Button componentsample_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 layoutlayout = zt.Layout(components=[sample_button])
pydantic model zero_true.ButtonThe 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.