obsidian/components/plugin-settings-component
Component that manages plugin settings: data, persistence, validation, and events.
This is the single public-facing settings API for plugin authors. All settings logic (load, save, validate, transform, clone) is handled directly by this component — no separate manager class is needed.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| PluginSettingsComponentBase | Base class for plugin settings components. Manages settings data, persistence, validation, and events. Plugin authors extend this class and implement createDefaultSettings. |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| PluginSettingsComponentBaseConstructorParams | Constructor parameters for PluginSettingsComponentBase. |
| PluginSettingsComponentBaseOnSaveSettingsParams | Parameters for PluginSettingsComponentBase.onSaveSettings. |
| PluginSettingsState | A snapshot of plugin settings state, including raw input values, effective (validated) values, and per-property validation messages. |
| Type | Description |
|---|---|
| ReadonlyPluginSettings | Readonly version of PluginSettings. |
| ReadonlyPluginSettingsState | Readonly version of PluginSettingsState for use in event callbacks and public getters. |
| SettingsValidator | A validator function for a settings property. |