doc: toggle filter

This commit is contained in:
Timothy Jaeryang Baek 2025-05-19 16:59:17 +04:00
parent d845b844aa
commit 6b82c1f1e6
2 changed files with 4 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class Filter:
{ {
"type": "status", "type": "status",
"data": { "data": {
"description": "Toggled!!", "description": "Toggled!",
"done": True, "done": True,
"hidden": False, "hidden": False,
}, },
@ -108,7 +108,9 @@ class Filter:
#### 🖼️ Whats happening? #### 🖼️ Whats happening?
- **toggle = True** creates a switch UI in Open WebUI—users can manually enable or disable the filter in real time. - **toggle = True** creates a switch UI in Open WebUI—users can manually enable or disable the filter in real time.
- **icon** (with a Data URI) will show up as a little image next to the filters name. You can use any SVG as long as its Data URI encoded! - **icon** (with a Data URI) will show up as a little image next to the filters name. You can use any SVG as long as its Data URI encoded!
- **The `inlet` function** uses the `__event_emitter__` special argument to broadcast feedback/status to the UI, such as a little toast/notification that reads "Toggled!!" - **The `inlet` function** uses the `__event_emitter__` special argument to broadcast feedback/status to the UI, such as a little toast/notification that reads "Toggled!"
![Toggle Filter](/images/features/plugin/functions/toggle-filter.png)
You can use these mechanisms to make your filters dynamic, interactive, and visually unique within Open WebUIs plugin ecosystem. You can use these mechanisms to make your filters dynamic, interactive, and visually unique within Open WebUIs plugin ecosystem.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB