Skip to content

ButtonComponent

Defined in: obsidian.d.ts:464

Extends

Constructors

new ButtonComponent()

new ButtonComponent(containerEl): ButtonComponent

Defined in: obsidian.d.ts:473

Parameters

containerEl

HTMLElement

Returns

ButtonComponent

Overrides

BaseComponent.constructor

Properties

buttonEl

buttonEl: HTMLButtonElement

Defined in: obsidian.d.ts:468


clickCallback()?

optional clickCallback: () => void

Defined in: src/obsidian/augmentations/Components/ButtonComponent.d.ts:9

The function that’s called after clicking the button.

Returns

void

disabled

disabled: boolean

Defined in: obsidian.d.ts:423

Inherited from

BaseComponent.disabled

Methods

onClick()

onClick(callback): this

Defined in: obsidian.d.ts:510

Parameters

callback

(evt) => any

Returns

this


removeCta()

removeCta(): this

Defined in: obsidian.d.ts:486

Returns

this


setButtonText()

setButtonText(name): this

Defined in: obsidian.d.ts:498

Parameters

name

string

Returns

this


setClass()

setClass(cls): this

Defined in: obsidian.d.ts:506

Parameters

cls

string

Returns

this


setCta()

setCta(): this

Defined in: obsidian.d.ts:482

Returns

this


setDisabled()

setDisabled(disabled): this

Defined in: obsidian.d.ts:477

Parameters

disabled

boolean

Returns

this

Overrides

BaseComponent.setDisabled


setIcon()

setIcon(icon): this

Defined in: obsidian.d.ts:502

Parameters

icon

string

Returns

this


setTooltip()

setTooltip(tooltip, options?): this

Defined in: obsidian.d.ts:494

Parameters

tooltip

string

options?

TooltipOptions

Returns

this


setWarning()

setWarning(): this

Defined in: obsidian.d.ts:490

Returns

this


then()

then(cb): this

Defined in: obsidian.d.ts:428

Facilitates chaining

Parameters

cb

(component) => any

Returns

this

Inherited from

BaseComponent.then