OptionalargIf defined, uses this command-line argument name instead of the default --category-config.
OptionalargIf defined, uses this single-character command-line argument name instead of none.
OptionalcssInline CSS styles to apply to the auto-generated HTML element for this config element.
OptionalcustomIf defined, appends these classes to the auto-generated HTML element for this config element.
OptionaldefaultThe default value for this config element, if not provided from other sources.
OptionaldescriptionA short description of this config element, shown as a tooltip in hte UI.
OptionaldisplayIf defined, uses this display name instead of the key.
OptionalelementIf true, will disable this config element in the UI. This value can be toggled with setEnabled.
OptionalenvIf defined, uses this environment variable name instead of the default PREFIX_CATEGORY_CONFIG.
OptionalhideIf true, will not show this config element in the UI,
but will still load from env or other sources and be available in values.
OptionalonIf defined, this function will be called when the user interacts with the config element in the UI.
OptionalskipIf true, will not generate a label for this config element. Useful when implementing custom toHtml.
OptionaltoIf defined, applies custom HTML rendering for this config element. If undefined, tries to auto-generate based on zod type.
The HTML should utilize several special data tags that will be replaced with the values the panel expects. They are:
data-all - shorthand to automatically inject the other general data-tags.data-id - The custom ID of the element, based off its category and name. 'id="gen_id"'data-classes - Any custom class names applied in the Config. 'class="class1 class2"'data-css - Custom CSS style rules applied directly to the element. 'style="border: 1px;"'data-checked - Sets (or omits) the "checked" flag for radio buttons and checkboxes. 'checked'VAL - The current value of the config element, as a double-quoted string. 'value=VAL' -> 'value="test-value"'The Zod type definition for this config element.
OptionaluseIf defined, uses this Zod type name instead of trying to unwrap the type.
This can be more convenient than redefining the HTML with toHtml, if the input type is simple.
For instance, when using zod pipes that should accept simple string inputs.
Every Config value can be heavily customized in terms of validation behavior and browser rendering.
Everything is optional, except for the
type, which is used to validate inputs from all sources.These config options expose in-depth customization for each Config entry. If such a thing is desired, entirely new HTML elements can be modeled using this configuration.