SettingPage
Official
Base class for sub-pages of a SettingTab.
Import:
import { SettingPage } from 'obsidian';Signature:
export class SettingPageConstructor
new SettingPage()Creates a new instance of SettingPage.
To get the constructor instance, use getSettingPageConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| containerEl | HTMLElement | Container for the page's content. Render into this element from display. | |
| rootEl | HTMLElement | The root element of the page. | |
| title | string | Title displayed in the page titlebar. | |
| titlebarEl | HTMLElement | The titlebar element of the page. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| display() | void | Called when the page is opened. Clears and re-renders content into containerEl. | |
| hide() | void | Hides the contents of the page. Any registered components should be unloaded when the page is hidden. Override this if you need to perform additional cleanup. Called when the user navigates away, the containing tab is switched, or the settings modal is closed. Not guaranteed to run when the host window is destroyed. |
Links to this page: