Skip to content

SettingGroup

Official

Setting group.

Import:

import { SettingGroup } from 'obsidian';

Signature:

export class SettingGroup

Constructor

new SettingGroup(containerEl: HTMLElement)

Constructor.

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

Properties

Property Type Description
components BaseComponent[] The components of the setting group.
controlEl HTMLDivElement The control element of the setting group.
groupEl HTMLDivElement The group element of the setting group.
headerEl HTMLDivElement The header element of the setting group.
headerInnerEl HTMLDivElement The header inner element of the setting group.
listEl HTMLElement The list element of the setting group.

Methods

Method Returns Description
addClass(classes?) this Add CSS classes to the setting group.
addExtraButton(cb) this Add an extra button to the setting group.
addSearch(cb) this Add a search input at the beginning of the setting group. Useful for filtering results or adding an input for quick entry.
addSearchControl(cb) this Adds a search control to the setting group's header.
addSetting(cb) this Add a setting to the setting group.
focusNearestItem(index) void Focuses the nearest visible item at or after the given index.
onDeleteItem(cb) this Registers a handler invoked when an item is deleted via the keyboard.
onReorderItem(cb) this Registers a handler invoked when an item is reordered via the keyboard.
setHeading(text) this Set the heading of the setting group.

Links to this page: