Skip to content

plugin-api/SettingsPanelRegistry#

useSettingsPanels()#

function useSettingsPanels(): SettingsPanelDef[];

React hook that returns all registered settings panels, re-rendering on changes.

Returns#

SettingsPanelDef[]


settingsPanelRegistry#

const settingsPanelRegistry: SettingsPanelRegistry;

SettingsPanelDef#

Properties#

applies?#

optional applies?: SettingsApplyMode;

How the panel's changes take effect; shown under its title. Omitted, no line is shown.

component#

component: ComponentType;

icon?#

optional icon?: ComponentType<{
  fontSize?: string;
}>;

id#

id: string;

isVisible?#

optional isVisible?: () => boolean;

Optional predicate that determines whether this panel tab should be shown.

Returns#

boolean

label#

label: string;

order#

order: number;

searchKeywords?#

optional searchKeywords?: readonly string[];

Extra terms Settings search matches this panel by, beside its label and field labels.


SettingsApplyMode#

type SettingsApplyMode = "instant" | "device" | "next_scan" | "restart_prompt" | "admin_restart";

How a panel's changes take effect, stated once under its title.

  • instant: on change.
  • device: sent to the connected device on change.
  • next_scan: on scans processed after the change.
  • restart_prompt: on change, except the fields that ask for a restart.
  • admin_restart: after an administrator confirms and the backend restarts.