Flarum (2.x)
    Preparing search index...
    interface TooltipAttrs {
        container?: string | false | HTMLElement;
        delay?: number;
        html?: boolean;
        ignoreTitleWarning?: boolean;
        position?: "top" | "bottom" | "left" | "right";
        showOnFocus?: boolean;
        text: string | string[];
        tooltipVisible?: boolean;
    }

    Hierarchy

    Index

    Properties

    container?: string | false | HTMLElement

    Appends the tooltip to a specific element. Useful when the tooltip trigger is inside a container with overflow: hidden or overflow: scroll that would otherwise clip the tooltip. Accepts a CSS selector string or DOM element — 'body' is the most common value.

    Default: false (appended adjacent to the trigger element).

    delay?: number

    Sets the delay between a trigger state occurring and the tooltip appearing on-screen.

    Warning: this option may be removed when switching to another tooltip library. Be prepared for this to break in Flarum stable.

    Default: 0.

    html?: boolean

    Whether HTML content is allowed in the tooltip.

    Warning: this is a possible XSS attack vector. This option shouldn't be used wherever possible, and may not work when we migrate to another tooltip library. Be prepared for this to break in Flarum stable.

    Default: false.

    ignoreTitleWarning?: boolean

    Used to disable the warning for passing text to the title attribute.

    Tooltip text should be passed to the text attribute.

    position?: "top" | "bottom" | "left" | "right"

    Tooltip position around element.

    Default: 'top'.

    showOnFocus?: boolean

    Whether to show on focus.

    Default: true.

    text: string | string[]

    Tooltip textual content.

    String arrays, like those provided by the translator, will be flattened into strings.

    tooltipVisible?: boolean

    Use to manually show or hide the tooltip. undefined will show based on cursor events.

    Default: undefined.