SettingGroup struggle

I was looking to utilize the newer SettingGroup to cluster my settings but I cannot seem to find any examples of it anywhere and the documentation is nearly non-existent. Anyone know where I can find more information or a solid example of its use?

Here’s a simple example. Typically you’d group multiple settings within a group.

const trashGroup = new SettingGroup(this.containerEl).setHeading("Trash");

trashGroup.addSetting((setting) => {
  setting
    .setName("Confirm file deletion")
    .setDesc("Ask before deleting a file.")
    .addToggle((toggle) => {
      toggle.setValue(this.plugin.settings.promptDelete);
      toggle.onChange(async (val) => {
        this.plugin.settings.promptDelete = val;
        await this.plugin.saveSettings();
      });
    });
  });
1 Like

I really appreciate the help!