Update README with PromptSwitch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user