Settings components provide pre-built UI elements for creating configuration interfaces in BetterDiscord plugins. These components handle state management, validation, and styling automatically.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/betterdiscord/betterdiscord/llms.txt
Use this file to discover all available pages before exploring further.
ColorInput
A color picker component with a custom color selector and optional color swatches.Current color value as hex string (e.g.,
"#ff0000") or number (e.g., 16711680)Callback function called when the color changes. Receives the new color value as a string.
Array of preset colors to display as swatches. Defaults to Discord’s default color palette.
Default color value. When provided, shows a default color button.
Whether the color picker is disabled
Usage
DropdownInput
A dropdown select menu with custom styling.Currently selected value
Array of option objects. Each option should have:
value(any): The option’s valuelabel(string): Display textid(string, optional): Unique identifier
Callback function called when selection changes. Receives the new value.
Visual style of the dropdown
Whether the dropdown is disabled
Usage
KeybindInput
A keybind recorder that captures keyboard input.Array of key names representing the current keybind (e.g.,
["Control", "Shift", "K"])Callback function called when the keybind changes. Receives the new key array.
Maximum number of keys allowed in the keybind
Whether to show a clear button
Whether the keybind input is disabled
Usage
NumberInput
A number input with increment and decrement buttons.Current numeric value
Callback function called when the value changes. Receives the new value.
Minimum allowed value
Maximum allowed value
Amount to increment/decrement by
Whether the input is disabled
Usage
RadioInput
A radio button group for selecting one option from multiple choices.Currently selected value
Array of option objects. Each option should have:
name(string): Display textvalue(any): The option’s valuedescription(string, optional): Description textcolor(string, optional): Border color when selected
Callback function called when selection changes. Receives the new value.
Name attribute for the radio group
Whether the radio group is disabled
Usage
SearchInput
A search input field with clear functionality.Callback function called when the input value changes. Receives a change event.
Placeholder text for the input
Additional CSS classes to apply
Callback function for keyboard events
Usage
SliderInput
A slider component with optional markers and unit display.Current slider value
Minimum value
Maximum value
Callback function called when the value changes. Receives the new value.
Step increment for the slider
Unit suffix to display (e.g.,
"%", "px", "ms")Array of marker positions. Can be numbers or objects with:
value(number): Position on the sliderlabel(string): Label to display
Whether the slider is disabled
Usage
SwitchInput
A toggle switch component.Current switch state
Callback function called when the switch is toggled. Receives the new boolean value.
HTML id attribute for the input element
Whether the switch is disabled
Whether to manage state internally
Usage
TextInput
A text input field component.Current input value
Callback function called when the input changes. Receives the new string value.
Placeholder text for the input
Maximum number of characters allowed
Whether the input is disabled
Callback function for keyboard events
Usage
SettingItem
A container component for individual settings that provides consistent layout with labels and descriptions.Unique identifier for the setting
Label text for the setting
Description or help text displayed below the setting
Whether to display the control inline with the label (recommended for switches)
The setting control component (e.g., SwitchInput, SliderInput)
Usage
SettingGroup
A collapsible group container for organizing multiple related settings.Unique identifier for the group
Display name for the group header
Array of setting configuration objects. Each setting should have:
id(string): Unique identifiername(string): Display namenote(string): Descriptiontype(string): Component type ("switch","slider","text","dropdown","number","radio","keybind","color","button","custom")value(any): Current valueonChange(function): Change handler- Additional props specific to the component type
Whether the group can be collapsed
Whether the group is initially expanded (for collapsible groups)
Callback function called when any setting changes. Receives
(id, settingId, value) or (settingId, value) depending on whether a group id is provided.Whether to show a divider after the group
Collection name for integration with BetterDiscord’s settings store
Callback function called when the group is expanded or collapsed
Additional custom content to render in the group