Skip to content

SettingDefinitionControl<K>

Official

A setting definition that renders a single bound control.

Import:

import type { SettingDefinitionControl } from 'obsidian';

Signature:

export interface SettingDefinitionControl<K extends string = string> extends SettingDefinitionBase

Extends: SettingDefinitionBase

Properties

PropertyTypeDescription
action?neverForbidden discriminant key — set only on SettingDefinitionAction.
aliases?string[]Additional search terms.
(Inherited from SettingDefinitionBase)
controlSettingControl<K>The control bound to a single setting key.
desc?DocumentFragment | stringDescription text or fragment. Used for rendering; the textContent of a fragment is used for search.
(Inherited from SettingDefinitionBase)
disabled?(() => boolean) | booleanDisables the row: adds is-disabled to the setting element and propagates to every component registered on it. Evaluated on each render; call refreshDomState() on the setting tab to re-evaluate in place.

Takes precedence over the disabled of a SettingDefinitionControl's own control. Precedence is decided by key presence, so setting this to undefined explicitly still suppresses that fallback.
(Inherited from SettingDefinitionBase)
namestringDisplay name — used for rendering and search.
(Inherited from SettingDefinitionBase)
render?neverForbidden discriminant key — set only on SettingDefinitionRender.
searchable?(() => boolean) | booleanControls search visibility. false or () => false excludes from search.
(Inherited from SettingDefinitionBase)
visible?(() => boolean) | booleanControls whether the item is rendered. false or () => false hides the item and also excludes it from search for that render cycle. Evaluated on each render; call update() on the setting tab to re-evaluate after the underlying state changes.
(Inherited from SettingDefinitionBase)

Links to this page: