PanelProps
type PanelProps = { children?: Snippet hideGlobalValues?: boolean hideToolbar?: boolean onOpenChange?: (open) => void onSettingsChange?: (settings, changed) => void openOnHover?: boolean persist?: boolean | string | PanelPersistProps persistSync?: boolean | string | Omit<PanelPersistProps, 'syncTabs'> resize?: boolean wiggleOnUpdate?: boolean zIndex?: number} & { name?: string value?: unknown values?: unknown} & Partial<PanelSettings> & Partial<InspectOptions> & SvelteHTMLElements['aside']Props for Inspect.Panel
Type Declaration
Section titled “Type Declaration”children?
Section titled “children?”optional children: Snippet;Extra elements to be added at the bottom of the panel
hideGlobalValues?
Section titled “hideGlobalValues?”optional hideGlobalValues: boolean;Don’t display “global” values added with addToPanel
Default
Section titled “Default”falsehideToolbar?
Section titled “hideToolbar?”optional hideToolbar: boolean;Don’t render Panel toolbar with controls for setting position, opacity and appearance
Default
Section titled “Default”falseonOpenChange()?
Section titled “onOpenChange()?”optional onOpenChange: (open) => void;Callback for when panel is opened or closed
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
Default
Section titled “Default”undefinedonSettingsChange()?
Section titled “onSettingsChange()?”optional onSettingsChange: (settings, changed) => void;Callback for when any panel prop/setting is changed with the panel UI. Can be used for
customized persisting of settings using localStorage
Will run when any of the following prop / setting is changed:
openalignappearanceopacitywidthandheight(if resizing is enabled)
Parameters
Section titled “Parameters”settings
Section titled “settings”Current value of settings
changed
Section titled “changed”keyof PanelSettings[]
Keys of changed settings
Returns
Section titled “Returns”void
Default
Section titled “Default”undefinedopenOnHover?
Section titled “openOnHover?”optional openOnHover: boolean;Panel should open on hover.
Enabling this will leave part of the panel visible for easier reach.
Default
Section titled “Default”falsepersist?
Section titled “persist?”optional persist: boolean | string | PanelPersistProps;Enable/disable persistence of PanelSettings using localStorage or sessionStorage
when changed through Panel UI, e.g. open/closed state, width, height, appearance, alignment and opacity setting.
When enabled, stored settings will take precedence over passed props.
Pass a configuration object (PanelPersistProps), true or a string (storage key) to enable.
Passing true will enable persistence and using these default options:
{ storage: 'local', key: 'siv.panel', syncTabs: false}Passing a string will use those defaults but use the passed string as the key
Default
Section titled “Default”falsepersistSync?
Section titled “persistSync?”optional persistSync: | boolean | string| Omit<PanelPersistProps, "syncTabs">;Alias for persist except tab syncing is always enabled.
If persist is truthy this prop will not have any effect.
Default
Section titled “Default”false- PanelProps.persist
- PanelPersistProps.syncTabs
resize?
Section titled “resize?”optional resize: boolean;Enable resizing
Default
Section titled “Default”truewiggleOnUpdate?
Section titled “wiggleOnUpdate?”optional wiggleOnUpdate: boolean;When closed, wiggle the panel button when an inspected value is updated
Default
Section titled “Default”truezIndex?
Section titled “zIndex?”optional zIndex: number;Z-index of panel
Default
Section titled “Default”1000Type Declaration
Section titled “Type Declaration”optional name: string;Name of inspected value. Will be displayed as the “key” of the value.
Will not be used if values is set
value?
Section titled “value?”optional value: unknown;Any (single) value of any type to be inspected.
Will not be inspected if BaseProps.values is used
If value is undefined or null without name being set,
the value will not be inspected
values?
Section titled “values?”optional values: unknown;Inspect every enumerable property of a value, object or array-like.
Allows for multiple root-level nodes, unlike value.