From 6edb2363cc9c2c0e3c1ff84d5ffcef07efdfe2e3 Mon Sep 17 00:00:00 2001 From: relhamdi Date: Mon, 25 May 2026 14:09:11 +0200 Subject: [PATCH] Update README with PromptSwitch --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index a8a57de..32a7012 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,34 @@ Slot lengths do not need to match. --- +### PromptSwitch + +#### Inputs + +- `on_true` (str) — value returned when condition is `True`. Accepts direct input or connected node. +- `on_false` (str) — value returned when condition is `False`. Accepts direct input or connected node. +- `condition` (bool), default `True` — controls which input is routed to the output. + +#### Outputs + +- `text` (str) — the selected value based on condition. + +#### Usage + +Connect or type a value in `on_true` and `on_false`. Toggle `condition` to switch between them. + +If the node is bypassed, an empty string is returned. + +#### Editor + +Input ports and widget borders are colored based on the active condition: +- **Orange**: active input when condition is `True` +- **Blue**: active input when condition is `False` +- **Gray**: inactive input +Colors are only shown when an input is connected or has a value. + +--- + ### Web #### contentEditable editor