A standalone button component that can be linked to a click event handler.

Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon’s id (such as arrow_forward) and it to your Button.

Fields

NameTypeDescriptionOptions
TextText
    DisabledTextDisables all event handlers.
    1. Yes
    2. No
    ButtonColor
      Button textColor
        IconTextA Material Symbols id, such as “arrow_forward”.
          Button shadowShadow
            SeparatorColor
              Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.

                Events

                Low code usage

                This component can be declared directly in Python, using backend-driven UI.

                ui.Button(content={
                        "text": "", # str 
                        "isDisabled": "no", # str [yes, no]
                        "buttonColor": "", # str 
                        "buttonTextColor": "", # str 
                        "icon": "", # str 
                        "buttonShadow": "", # str 
                        "separatorColor": "", # str 
                        "cssClasses": "", # str 
                    },
                    handlers={
                        "wf-click": handle_event,
                    }
                )
                

                A function, in this example handle_event, should be implemented in your code to handle events.

                def handle_event(state, payload, context, ui):
                  pass
                

                Reference