Multi toggles [darkilNodes]
Several toggles, one node, and a join string that knows how to say 'and'
- as_list
- as_string
- ❓help
A plain boolean gets you on/off. This node gets you which combination: several toggle switches on one node, with an as_list output of everything selected and an as_string output that joins them into prompt-ready text. It's the classic workflow-UI problem - "I want to add 'detailed eyes', 'soft light' and 'film grain' to my prompt, tick whichever" - solved without dropping a string of comma-separated booleans into your prompt.
How it works
All the behavior is configured in the node's properties, not its inputs:
text_for_toggles- the option list, semicolon- or pipe-separated. You can use plain labels orlabel::valuepairs, where the value is what actually gets output (useful when your prompt wantsdetailed eyesbut you want the toggle to readEyes).is_radio_toggles- when on, the toggles behave like radio buttons: exactly one can be active. Great for mutually exclusive style choices.trim_values- strips whitespace from values before joining.last_word- a word inserted before the final selected item in the joined string. Default behavior gives youa, b and cstyle lists; set it toandand the output becomes human-readable instead of a CSV.delimiter- the join string (default,).
The selected toggles are sent to the node as a hidden JSON list, and the node joins them: as_list is the raw selection, as_string applies the delimiter plus the last_word grammar when more than one item is selected.
Inputs and outputs
There are no visible required inputs - configuration is all in properties. Outputs:
as_list(STRING, list type) - the selected values, one per list entry. Feed this to a node that iterates or concatenates lists.as_string(STRING) - the joined text, ready for a prompt or any text sink.❓help(STRING) - the node's own documentation on a live socket.
The as_list output is the sleeper feature: because it's a real list, you can loop over the selection or push it into anything that consumes string lists, which plain "join everything" nodes can't do.
Where people get burned
The property-vs-widget confusion strikes again - text_for_toggles lives in the property panel, so a node that looks empty on the canvas is actually unconfigured. Also, if you flip is_radio_toggles on after building a multi-select workflow, remember it changes the selection behavior, not just the UI - the joined string will only ever have one item once you're in radio mode. And a small formatting gotcha: the delimiter supports \n and \t escapes, but they're only interpreted after you've typed them literally, so \n in the property becomes a real newline, not a slash-n.
Installing
Part of pytraveler/comfyui-darkil-nodes. ComfyUI Manager search ComfyUI-darkil-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/comfyui-darkil-nodes
Restart. No Python deps, no model downloads - pure logic/UI.
Inputs (0)
No inputs
Outputs (3)
| Name | Type | Description |
|---|---|---|
| as_list | STRING | — |
| as_string | STRING | — |
| ❓help | STRING | — |