Skip to content

SecretComponent

Official

Component for a secret input.

Import:

import { SecretComponent } from 'obsidian';

Signature:

export class SecretComponent extends BaseComponent

Extends: BaseComponent

Constructor

new SecretComponent(app: App, containerEl: HTMLElement)

Constructor.

To get the constructor instance, use getSecretComponentConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
disabledbooleanWhether the component is disabled.
(Inherited from BaseComponent)

Methods

MethodReturnsDescription
onChange(cb)thisSets the callback function to be called when the value of the secret component changes.
setDisabled(disabled)thisSets the disabled state of the component.
(Inherited from BaseComponent)
setValue(value)thisSets the value of the secret component.
then(cb)thisFacilitates chaining.
(Inherited from BaseComponent)

Links to this page: