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

Property Type Description
disabled boolean Whether the component is disabled.
(Inherited from BaseComponent)

Methods

Method Returns Description
onChange(cb) this Sets the callback function to be called when the value of the secret component changes.
setDisabled(disabled) this Sets the disabled state of the component.
(Inherited from BaseComponent)
setValue(value) this Sets the value of the secret component.
then(cb) this Facilitates chaining.
(Inherited from BaseComponent)

Links to this page: