mirror of
https://github.com/centau/vide.git
synced 2026-08-20 23:01:37 +00:00
Add tag() action for CollectionService tags
Adds a built-in `vide.tag()` action that wraps `Instance:AddTag()` / `Instance:RemoveTag()` so tags can be applied through `create()` props. It accepts a static string or array of strings, or a reactive source returning either. The reactive variant diffs the previous and new tag sets so only the delta is applied. All tags added by the action are removed when the surrounding scope is destroyed. Includes mock support for `AddTag`/`RemoveTag`/`HasTag`/`GetTags`, tests, API reference docs, and a closing note in the actions tutorial. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
19eaeb424f
commit
18c1d02d43
7 changed files with 276 additions and 0 deletions
|
|
@ -53,3 +53,8 @@ instance.Text = "foo" -- "foo" will be printed by the effect
|
|||
|
||||
The source `output` will be updated with the new property value any time it is
|
||||
changed externally.
|
||||
|
||||
Vide also ships a few common actions out of the box, such as `vide.changed()`
|
||||
for the pattern above and `vide.tag()` for adding
|
||||
[CollectionService](https://create.roblox.com/docs/reference/engine/classes/CollectionService)
|
||||
tags to an instance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue