Universal DevTools Kit SDK / @u-devtools/core / SettingSchemaDef
Interface: SettingSchemaDef
Defined in: index.ts:373
Setting schema definition for a single setting. Used to define user-configurable settings that appear in the DevTools settings panel.
Example
const pluginWithSettings: PluginClientInstance = {
name: 'My Plugin',
icon: 'Cube',
settings: {
fontSize: {
label: 'Font Size',
description: 'Base font size for the plugin',
type: 'number',
default: 14,
},
theme: {
label: 'Theme',
type: 'select',
default: 'dark',
options: [
{ label: 'Dark', value: 'dark' },
{ label: 'Light', value: 'light' },
],
},
},
renderMain(container, api) {
// Access settings
const fontSize = api.settings.get('fontSize', 14);
const theme = api.settings.get('theme', 'dark');
return () => {};
}
};Properties
default?
optionaldefault:unknown
Defined in: index.ts:381
Default value
description?
optionaldescription:string
Defined in: index.ts:377
Optional description/tooltip text
items?
optionalitems:Record<string,SettingSchemaDef>
Defined in: index.ts:385
Schema for array items (for 'array' type with object items)
itemType?
optionalitemType:"string"|"number"
Defined in: index.ts:387
Item type for 'array' type with primitive items ('string' or 'number')
label
label:
string
Defined in: index.ts:375
Display label for the setting
options?
optionaloptions:object[]
Defined in: index.ts:383
Options for 'select' type settings
label
label:
string
value
value:
unknown
type
type:
SettingType
Defined in: index.ts:379
Setting type (determines input component)