SettingDefinitionGroup<K>
Official
A group of settings rendered under a shared heading. Used as an inline group in the array returned by getSettingDefinitions(). For collections of mutable data (with add/delete/reorder affordances), use SettingDefinitionList instead.
Import:
import type { SettingDefinitionGroup } from 'obsidian';Signature:
export interface SettingDefinitionGroup<K extends string = string>Properties
| Property | Type | Description | |
|---|---|---|---|
| cls? | string | CSS classes to add to the group element. | |
| extraButtons? | ((component: ExtraButtonComponent) => any)[] | Extra button configuration for the header. | |
| heading? | string | Heading text displayed above the group. | |
| items? | SettingGroupItem<K>[] | Settings within this group. | |
| search? | { /** * Placeholder text for the search input. * @public * @since 1.13.1 */ placeholder?: string; /** * Predicate called for each direct child definition of this group. * Return true to show the item, false to hide. Items with * searchable: false bypass this filter and always show.* @public * @since 1.13.1 */ match: (def: SettingDefinition, query: string) => boolean; } | Adds a search input to the group header that filters the group's children by match(def, query). The query is preserved across re-renders and the filter is reapplied after each render. | |
| type | 'group' | 'list' | ||
| visible? | boolean | (() => boolean) | Controls whether the group is rendered. false or () => false hides it entirely (heading, controls, and items). Evaluated on each render. Default: true. |
Links to this page: