x4js - v2.2.49
    Preparing search index...

    Interface ButtonProps

    Button properties.

    interface ButtonProps {
        attrs?: Record<string, string | number | boolean>;
        autorepeat?: number | boolean;
        click?: EventCallback<EvClick>;
        cls?: string;
        content?: ComponentContent;
        disabled?: boolean;
        dom_events?: GlobalDOMEvents;
        existingDOM?: HTMLElement;
        flex?: number | boolean;
        height?: string | number;
        hidden?: boolean;
        icon?: string;
        id?: string;
        label?: string | UnsafeHtml;
        menu?: MenuElement[] | (() => MenuElement[]);
        ns?: string;
        ref?: RefType<any>;
        style?: Partial<CSSStyleDeclaration>;
        tabindex?: number | boolean;
        tag?: string;
        tooltip?: string;
        width?: string | number;
    }

    Hierarchy (View Summary)

    Index
    attrs?: Record<string, string | number | boolean>

    HTML attributes.

    autorepeat?: number | boolean

    Enable auto-repeat behavior when button is held down.

    • true uses default 200ms repeat interval
    • number specifies custom repeat interval in milliseconds

    First click triggers after 500ms, then repeats at specified interval.

    Callback function invoked when button is clicked cf. ButtonEvents

    cls?: string

    Additional CSS classes.

    Child content (components, strings, or HTML).

    disabled?: boolean

    Component is initialy disabled.

    dom_events?: GlobalDOMEvents

    DOM event listeners.

    existingDOM?: HTMLElement

    Existing DOM element to wrap.

    flex?: number | boolean

    Enables flex layout (boolean) or sets flex-grow (number).

    height?: string | number

    Height (px or string like "50%").

    hidden?: boolean

    Component is initialy hidden.

    icon?: string

    Icon identifier to display

    id?: string

    Element ID.

    label?: string | UnsafeHtml

    Text or HTML content of the button

    menu?: MenuElement[] | (() => MenuElement[])
    ns?: string

    Namespace for SVG/MathML elements.

    ref?: RefType<any>

    Reference to the component instance.

    style?: Partial<CSSStyleDeclaration>

    Inline CSS styles.

    tabindex?: number | boolean

    Tab index for keyboard navigation.

    • false to exclude from tab order
    • number to set specific tab index
    tag?: string

    HTML tag name (default: "div").

    tooltip?: string

    Tooltip text.

    width?: string | number

    Width (px or string like "50%" or "3em").