@nospamproxy/core
    Preparing search index...

    A button that calls a function when clicked.

    // example.ts
    class Example {
    action() {
    console.log("Clicked!");
    }
    }
    <!-- example.html -->
    <button-control action.call="action()">
    Click me!
    </button-control>
    Index

    Constructors

    Properties

    action: (event: Event) => void = ...

    Injected action for the command. The default action does not do anything.

    disabled: boolean = false

    Set this to true to disable the underlying button

    titleText?: string

    A title text for the button that is used by screen readers and visible when hovering.

    This should be used when the button contains only an icon.

    variant: "default" | "primary" | "danger" = 'default'

    Set the style variant of the button.