Skip to content

PluginSettingsTabBase<PluginSettings>

Base class for creating plugin settings tabs in Obsidian. Provides a method for binding value components to plugin settings and handling changes.

Import:

import { PluginSettingsTabBase } from 'obsidian-dev-utils/obsidian/plugin/plugin-settings-tab';

Signature:

export class PluginSettingsTabBase<PluginSettings extends object> extends mixinAsyncEvents<PluginSettingsTabBaseEventMap>()(PluginSettingTab)

Extends: mixinAsyncEvents<PluginSettingsTabBaseEventMap>()(PluginSettingTab)

Constructor

new PluginSettingsTabBase(params: PluginSettingsTabBaseConstructorParams<PluginSettings>)

Creates a new plugin settings tab.

Properties

PropertyTypeDescription
pluginSettingsComponentPluginSettingsComponentBase<PluginSettings>The settings manager.

Methods

MethodReturnsDescription
bind(params)TValueComponentBinds a value component to a plugin setting.
display()voidRenders the plugin settings tab.
displayLegacy()voidLegacy way to render the plugin settings tab.

Temporary workaround to avoid dealing with @deprecated.
hide()voidHides the plugin settings tab.
hideAsync()Promise<void>Async actions to perform when the settings tab is being hidden.
onLoadSettings(_loadedState, _isInitialLoad)Promise<void>Called when the plugin settings are loaded.
revalidate()Promise<void>Revalidates the settings.
show()voidShows the plugin settings tab.

Links to this page: