Selection input
WebApp Selection input
- parent
- Option index
- full_value
- value
- Order + 1
The dropdown is the workhorse of any form, and WebApp_Selectioninput is this pack's version: the control that lets your app users pick from a fixed list - aspect ratios, checkpoint names, style presets, anything that shouldn't be free text. It's the most feature-complete of the input nodes, with multi-select, a "hidden full value" trick, and three outputs that give you the pick three different ways.
Same pack model as all the controls: you define it as a node in your ComfyUI graph, export the workflow API, and a framework like Simian WebApps renders the real dropdown and sends the selection back.
The inputs that matter
- options (STRING, multiline) - the selectable choices, new-line separated. One option per line.
- default (STRING) - the option pre-selected when the app loads.
- full_options (STRING, multiline) - this is the clever one. You can show users a short, readable string but pass a full, more complex value downstream. One
full_optionsentry peroptionsline, and the selected item's hidden full string is what flows out thefull_valueoutput. So the app shows "SDXL" while the workflow gets "stabilityai/stable-diffusion-xl-base-1.0". - maximum (INT, default 1) - how many items can be selected at once. Set it above 1 and you get a multi-select; the outputs become lists of the picked values.
- value_in (COMBO) - the value used when running the workflow in ComfyUI. In the canvas this is a dropdown widget; the pack's front-end JS turns your
optionstext into that widget so you can test locally.
The outputs
- Option index (INT, a list) - the index of each selected option in the
optionslist. - full_value (STRING, a list) - the hidden full string for each selection.
- value (STRING, a list) - the selected option text itself.
- Order + 1 (INT) - the usual auto-sequence chain slot.
advanced, parent, tooltip, and value_from_interface behave like the rest of the pack.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/MonkeyProof-Solutions-BV/ComfyUI_webapp
Restart ComfyUI, or use ComfyUI Manager → search ComfyUI_webapp ("WebApp API"). No models, no keys; dependencies are pillow and torch only.
Gotchas
Two real ones. First, full_options must line up with options - if the counts don't match, the node can't map the selection and full_value comes back as [None]. Keep them in the same order and same length. Second, the pack's version caveat: it's built on the newer backend node API (comfy_api.latest), so a stale ComfyUI won't load it. Update ComfyUI first, then check your option lists.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| value_in | COMBO | This value is used when running the workflow in ComfyUI. | |
| options | STRING | Web app selectable options. New line separated. | |
| default | STRING | Default selected option | |
| full_options | STRING | Full strings hidden behind selectable, shorter strings. | |
| maximum | INT | 1 | Number of items that may be selected at the same time. |
| order | INT | 10 | Control order in its section. Lowest value at the top. Highest at the bottom. |
| advancedopt | BOOLEAN | false | Control is only shown when advanced is True. |
| value_from_interfaceopt | STRING | To be used when modifying the workflow API json from an external interface. Note that this string is interpreted as a json string. | |
| parentopt | PARENT | Web app parent to add the node to. | |
| tooltipopt | STRING | Web app control tooltip. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| Option index | INT | The indices of the selected values. |
| full_value | STRING | Full selected value. |
| value | STRING | Output value. |
| Order + 1 | INT | Order number for the next control. |