Conversation
ameerabuf
left a comment
There was a problem hiding this comment.
I agree with the direction, and it does seem to be the same information in much less text, but I do not feel comfortable removing so much without first testing to see there is no regression. We can use Monty's QA-flow on this branch or something like this...
Added customEffect rules to hover and click; Fixes to viewprogress.md
Added missing composite effect property in types
Added TOCs
ameerabuf
left a comment
There was a problem hiding this comment.
read click and hover. There were already quite a few comments, some are critical IMO, so I submit now and I will continue with the other triggers.
packages/interact/rules/hover.md
Outdated
| duration: [DURATION_MS], | ||
| easing: '[EASING_FUNCTION]', | ||
| fill: '[FILL_MODE]', | ||
| keyframeEffect: { |
There was a problem hiding this comment.
I don't think the comment is enough' it just creates a contradiction between the template and the text. Why not the same as in the first rule? maybe shorten it something like
// One of:
keyframeEffect: [KEYFRAME_EFFECT_DEF],
// Or
namedEffect: [NAMED_EFFECT_DEF],
packages/interact/rules/hover.md
Outdated
| - `[SOURCE_KEY]` — same as Rule 1. | ||
| - `[POINTER_TYPE]` — same as Rule 1. | ||
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. | ||
| - `[OFFSET_EASING]` — easing curve for the stagger distribution (e.g. `'sineOut'`, `'linear'`). |
There was a problem hiding this comment.
same comment about the different easing format
There was a problem hiding this comment.
is it? there is still does not reference motion like the others
packages/interact/rules/viewenter.md
Outdated
| { | ||
| key: 'hero', | ||
| trigger: 'viewEnter', | ||
| params: { type: 'once', threshold: 0.2 }, |
There was a problem hiding this comment.
I think we should keep the properties that are not fixed-value templated like in the rules (like threshold, duration, namedEffect), or with placeholder syntax like threshold: <threshold> instead of fixed values
There was a problem hiding this comment.
I think that you might not have pushed this fix then
| { opacity: '0', transform: 'translateY(-40px)' } | ||
| ] | ||
| key: '[TARGET_KEY]', | ||
| customEffect: (element: Element, progress: number) => { |
There was a problem hiding this comment.
let's at least make this whole rule match the time-based structure of the customEffect rule
There was a problem hiding this comment.
Not following, looks fine
There was a problem hiding this comment.
there it is simply customEffect: [CUSTOM_EFFECT_CALLBACK] and the signature and explanation are in the variables section. There are many such mismatches everywhere since we insist on not pulling/copying it from a single source of truth
| - `hitArea` — determines where mouse movement is tracked: | ||
| - `'self'` — tracks mouse within the source element's bounds only. Use for local hover effects. | ||
| - `'root'` — tracks mouse anywhere in the viewport. Use for global cursor followers, ambient effects. | ||
| - `axis` — restricts pointer tracking to a single axis. Only relevant when using `keyframeEffect`: |
There was a problem hiding this comment.
is it really though? Do we know to ignore it with other types of effects?
packages/interact/rules/click.md
Outdated
| - For controlling ongoing animations | ||
| - When users should be able to interrupt and resume animations | ||
| - For interactive media controls | ||
| **CRITICAL:** Always include `fill: 'both'` for `type: 'alternate'` or `'repeat'` — keeps the effect applied while finished and prevents garbage-collection, allowing efficient toggling. For `type: 'once'`, use `fill: 'backwards'` or `fill: 'none'`. |
There was a problem hiding this comment.
For type: 'once', use fill: 'backwards' or fill: 'none' - could create bugs. Directing AI to use fill: 'none' on such animation could cause flickering. Also why not use fill: 'both'?
I think a sentence about the initial styling of the target element and how it corresponds to what fill-value to use might be more accurate here
There was a problem hiding this comment.
If you use fill: both you prevent the animation from being GC'd.
Maybe we should set it to backwards for now
packages/interact/rules/click.md
Outdated
| **CRITICAL:** Always include `fill: 'both'` for `type: 'alternate'` or `'repeat'` — keeps the effect applied while finished and prevents garbage-collection, allowing efficient toggling. For `type: 'once'`, use `fill: 'backwards'` or `fill: 'none'`. | ||
|
|
||
| **Pattern**: | ||
| **Multiple effects:** The `effects` array can contain multiple effects — all share the same click trigger and fire together. Use this to animate different targets from a single click event. |
There was a problem hiding this comment.
Another example of something that is true for all trigger-types
There was a problem hiding this comment.
yes, this was added later when I thought that the model isn't using this feature. Let's remove and keep the comment below
packages/interact/rules/click.md
Outdated
| } | ||
| ``` | ||
| - `[SOURCE_KEY]` — identifier matching the element's key (`data-interact-key` for web, `interactKey` for React). The element that listens for clicks. | ||
| - `[TARGET_KEY]` — identifier matching the element's key on the element that animates. Same as `[SOURCE_KEY]` for self-targeting, or different for cross-targeting. |
There was a problem hiding this comment.
I think the second sentence is unnecessary. A more informative sentence for usage would be empty (undefined) to target the same element as the source or a different key for targeting another element.
Currently it just states something trivial, while in my suggestion it at least gives information about the syntax.
packages/interact/rules/click.md
Outdated
| - `[SOURCE_KEY]` — identifier matching the element's key (`data-interact-key` for web, `interactKey` for React). The element that listens for clicks. | ||
| - `[TARGET_KEY]` — identifier matching the element's key on the element that animates. Same as `[SOURCE_KEY]` for self-targeting, or different for cross-targeting. | ||
| - `[EVENT_TRIGGER_TYPE]` — `PointerTriggerParams.type`. One of: | ||
| - `'alternate'` — plays forward on first click, reverses on next click. Most common for toggles. |
There was a problem hiding this comment.
plays backwards on next click, and so on? Just a suggestion, maybe not that important
There was a problem hiding this comment.
No, it's intentional. First trigger is play() and then it's reverse(). Think reversing a reversed animation.
| - `'alternate'` — plays forward on first click, reverses on next click. Most common for toggles. | ||
| - `'repeat'` — restarts the animation from the beginning on each click. | ||
| - `'once'` — plays once on the first click and never again. | ||
| - `'state'` — resumes/pauses the animation on each click. Useful for continuous loops (`iterations: Infinity`). |
There was a problem hiding this comment.
another non-critical suggestion - plays/resumes on first click, pauses on the next click, and so on?
There was a problem hiding this comment.
It was corrected once by Claude, I think it's ok this way.
packages/interact/rules/click.md
Outdated
| // can be `selector` or `listContainer` for multiple effects, or a separate effect definitions with | ||
| { | ||
| // can be an inline Effect, or a reference to an effect defined in top level `effects` map | ||
| effectId: '[EFFECT_ID]', | ||
| listContainer: '[LIST_CONTAINER_SELECTOR]' | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| **Variables**: | ||
|
|
||
| - `[OFFSET_MS]`: Stagger offset in ms between consecutive effects (typically 100-200ms) | ||
| - `[OFFSET_EASING]`: Easing for stagger distribution — `'linear'`, `'quadIn'`, `'sineOut'`, etc. | ||
| - `[EFFECT_ID_N]`: Effect id from the effects registry for each element | ||
| - `[TARGET_KEY_N]`: Element key for each target | ||
| - Other variables same as Rule 1 | ||
|
|
||
| **Example - Orchestrated Content Reveal**: | ||
|
|
||
| ```typescript | ||
| { | ||
| key: 'reveal-button', | ||
| trigger: 'click', | ||
| params: { | ||
| type: 'alternate' | ||
| }, | ||
| sequences: [ | ||
| { | ||
| offset: 150, | ||
| offsetEasing: 'sineOut', | ||
| effects: [ | ||
| { effectId: 'heading-entrance', key: 'content-heading' }, | ||
| { effectId: 'body-entrance', key: 'content-body' }, | ||
| { effectId: 'image-entrance', key: 'content-image' } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| Each `[EFFECT_ID]` must be defined in the top-level `effects` map of the `InteractConfig`: |
There was a problem hiding this comment.
this is still very confusing and contradicting - I believe we can allow 2 templates for this rule to be more clear. A template using inline effects, and another using ids. I am not sure what to do about the confusion of the selectors, it might require another template.
I think that there is nothing that is click-specific here, and the better solution is to have sequences.md (possibly sequences-and-lists.md) and define the rules of usage with sequences there. It is not trigger-specific, and could get complicated and breaks because we are trying to minimize the context that explains it.
There was a problem hiding this comment.
The idea is not to have in these rules ONLY stuff for this trigger. There is some expected overlap so that each rules file can also be used standalone
packages/interact/rules/click.md
Outdated
| duration: [DURATION_MS], | ||
| easing: '[EASING_FUNCTION]', | ||
| fill: 'both', | ||
| // keyframeEffect or namedEffect |
There was a problem hiding this comment.
the comment do not match the object underneath and these kind of things are what confuses the LLM. We can change the object to be more general somehow or include both options with OR like in the first rule.
packages/interact/rules/click.md
Outdated
| - Simple state toggles | ||
| - CSS custom property updates | ||
| - `[SOURCE_KEY]` / `[EVENT_TRIGGER_TYPE]` — same as Rule 1. | ||
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. |
There was a problem hiding this comment.
mention 'stagger' as the LLM seemed to not do that connection by itself.
packages/interact/rules/click.md
Outdated
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. | ||
| - `[OFFSET_EASING]` — easing curve for the stagger distribution. |
There was a problem hiding this comment.
This is not a standard interface. I think a few words about how the delay is calculated should be here
There was a problem hiding this comment.
It's standard in other animation libraries, but improved a bit
packages/interact/rules/click.md
Outdated
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. | ||
| - `[OFFSET_EASING]` — easing curve for the stagger distribution. | ||
| - `[EFFECT_ID]` — string key referencing an entry in the top-level `effects` map. Same concept as `[UNIQUE_EFFECT_ID]` in Rule 1. | ||
| - `[LIST_CONTAINER_SELECTOR]` — CSS selector for the container whose direct children will be staggered. |
There was a problem hiding this comment.
and here is our problem - not given as optional.
There was a problem hiding this comment.
Maybe we should just replace the whole object with a single placeholder that implies to just use an effect
packages/interact/rules/hover.md
Outdated
|
|
||
| **Pattern**: | ||
| - `[SOURCE_KEY]` (interaction `key`) — a stable wrapper element that receives the mouse events. | ||
| - `[TARGET_KEY]` (effect `key` or `selector`) — the inner element that actually animates. |
There was a problem hiding this comment.
Oh I understand what you mean but that is not so clear from the sentence. You mean that targeting a different element could be used be either giving a different key to the effect or no key and a selector that target an inner element. This is not clear from that sentence and rather seems like there is a single variable TARGET_KEY that could either be a key or a selector and that does not work with the templates below.
I can imagine a scenario of an agent just placing selectors in the key field due to that.
packages/interact/rules/hover.md
Outdated
| Use `keyframeEffect` or `namedEffect` when the hover should play an animation (CSS or WAAPI). Pair with `PointerTriggerParams` to control playback behavior. | ||
|
|
||
| **Purpose**: Hover interactions that play forward on mouse enter and reverse on mouse leave (`type: 'alternate'`). | ||
| **CRITICAL:** Always include `fill: 'both'` for `type: 'alternate'`, `'repeat'` — keeps the effect applied while hovering and prevents garbage-collection. For `type: 'once'`, use `fill: 'backwards'` or `fill: 'none'`. |
There was a problem hiding this comment.
I might be missing something but - type: 'once'+fill: 'none' can only work if the animation's first and last frames are the same and basically apply no transformations? I cannot see how there is no "jump" in any other case
| iterations: [ITERATIONS], | ||
| alternate: [ALTERNATE_BOOL] | ||
| }, | ||
| // additional effects targeting other elements can be added here |
There was a problem hiding this comment.
might be a nit-pick for now, but could also be additional effects on the same target for composition, but maybe leave it like that for now
packages/interact/rules/hover.md
Outdated
| - `'remove'` — removes a previously applied style state on enter. | ||
| - `'clear'` — clears all previously applied style states on enter. Useful for resetting multiple stacked style state changes at once. |
There was a problem hiding this comment.
Also here I think the use-case should be made clear
packages/interact/rules/hover.md
Outdated
|
|
||
| **Purpose**: Hover interactions that stagger animations across multiple targets using a sequence instead of manual delays. | ||
| - `[SOURCE_KEY]` / `[TARGET_KEY]` / `[EVENT_TRIGGER_TYPE]` — same as Rule 1. | ||
| - `[CUSTOM_EFFECT_CALLBACK]` — function with signature `(element: HTMLElement, progress: number) => void`. Called on each animation frame with `progress` from 0 to 1. |
There was a problem hiding this comment.
target element (not source).
Maybe we could just do (target: HTMLElement, progress: number) => void
packages/interact/rules/hover.md
Outdated
| duration: [DURATION_MS], | ||
| easing: '[EASING_FUNCTION]', | ||
| fill: '[FILL_MODE]', | ||
| keyframeEffect: { |
There was a problem hiding this comment.
I don't think the comment is enough' it just creates a contradiction between the template and the text. Why not the same as in the first rule? maybe shorten it something like
// One of:
keyframeEffect: [KEYFRAME_EFFECT_DEF],
// Or
namedEffect: [NAMED_EFFECT_DEF],
packages/interact/rules/hover.md
Outdated
| - `[SOURCE_KEY]` — same as Rule 1. | ||
| - `[POINTER_TYPE]` — same as Rule 1. | ||
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. | ||
| - `[OFFSET_EASING]` — easing curve for the stagger distribution (e.g. `'sineOut'`, `'linear'`). |
There was a problem hiding this comment.
is it? there is still does not reference motion like the others
packages/interact/rules/hover.md
Outdated
| - `[OFFSET_MS]` — time offset between each child's animation start, in milliseconds. | ||
| - `[OFFSET_EASING]` — easing curve for the stagger distribution (e.g. `'sineOut'`, `'linear'`). | ||
| - `[EFFECT_ID]` — string key referencing an entry in the top-level `effects` map. Same concept as `[UNIQUE_EFFECT_ID]` in Rule 1. | ||
| - `[LIST_CONTAINER_SELECTOR]` — CSS selector for the container whose direct children will be staggered. |
There was a problem hiding this comment.
again - optional. And the way to use sequence without it is not clear from this rule
|
|
||
| ### Hit Area Configuration (`hitArea`) | ||
| - The source element **MUST NOT** have `pointer-events: none` — it needs to receive pointer events. | ||
| - **MUST AVOID** using the same element as both source and target with effects that change size or position (e.g. `transform: translate(…)`, `scale(…)`). The transform shifts the hit area, causing jittery re-entry cycles. Instead, use `selector` to target a child element for the animation. |
There was a problem hiding this comment.
This is a much more clear explanation of how to use selector maybe copy some of it to hover?
| - `axis` — restricts pointer tracking to a single axis. Only relevant when using `keyframeEffect`: | ||
| - `'x'` — maps horizontal pointer position to 0–1 progress for keyframe interpolation. | ||
| - `'y'` — maps vertical pointer position to 0–1 progress for keyframe interpolation. **Default** when `keyframeEffect` is used. | ||
| - When omitted with `namedEffect` or `customEffect`, both axes are available via the 2D progress object. |
There was a problem hiding this comment.
Does it have to be ommited? what happens if namedEffect or customEffect are used with axis? is it ignored?
| --- | ||
|
|
||
| ## Rule 9: Multi-Element Custom Parallax with customEffect | ||
| For devices with dynamic viewport sizes (e.g. mobile browsers where the address bar collapses), consider using viewport-relative units carefully and prefer `lvh`/`svh` over `dvh` unless dynamic viewport behavior is specifically desired. |
There was a problem hiding this comment.
I guess Claude did not entirely understand me there, though this is also not a bad advice for keyframeEffects here. This was meant to be added in viewProgress.md in a section parallel to this one (## Device Conditions).
| - `[SOURCE_KEY]` — identifier matching the element's key (`data-interact-key` for web, `interactKey` for React). The element that tracks mouse movement. | ||
| - `[TARGET_KEY]` — identifier matching the element's key on the element to animate. Can be the same as source, or different when separating hit area from animation target. | ||
| - `[HIT_AREA]` — `'self'` (mouse within source element) or `'root'` (mouse anywhere in viewport). | ||
| - `[NAMED_EFFECT_TYPE]` — preset name from `@wix/motion-presets` mouse category: |
There was a problem hiding this comment.
wow this is extensive and unlike the other triggers. I guess Claude misunderstood my comment above too. This seems like an overkill - let's reference to motion-presets if that is what we are intending to go with. If not, let's put such a list for every trigger.
| - Refer to motion-presets rules for detailed options of each preset. Do NOT guess preset option names/types; omit unknown options and rely on defaults. | ||
| - `[CENTERED_TO_TARGET]` — `true` or `false`. See **Centering with `centeredToTarget`** above. | ||
| - `[TRANSITION_DURATION_MS]` — optional. Milliseconds for smoothing between progress updates. Adds inertia to the effect. | ||
| - `[TRANSITION_EASING]` — optional. Easing for the smoothing transition (e.g., `'easeOut'`). Adds a natural deceleration feel. |
There was a problem hiding this comment.
format of the easing should be clear. If it follows some standard easing names, reference this standard.
| const visibleText = text.substring(0, visibleLength); | ||
| element.textContent = visibleText + (progress < 1 ? '|' : ''); | ||
| - `[SOURCE_KEY]` — identifier matching the element's key (`data-interact-key` for web, `interactKey` for React). The element whose scroll position drives the animation. | ||
| - `[TARGET_KEY]` — identifier matching the element's key on the element to animate (can be same as source or different). |
There was a problem hiding this comment.
suddenly no word about data-interact-key, interactKey (+1 for single unified variables JSON)
| - `'cover'` — full visibility span from first pixel entering to last pixel leaving. | ||
| - `'entry'` — the phase while the element is entering the viewport. | ||
| - `'exit'` — the phase while the element is exiting the viewport. | ||
| - `'contain'` — while the element is fully contained in the viewport. Typically used with a `position: sticky` container. |
There was a problem hiding this comment.
let's leav it like that for now, but unfortunately it is not as simple as that. Things change here for "tall" elements
| { opacity: '0', transform: 'translateY(-40px)' } | ||
| ] | ||
| key: '[TARGET_KEY]', | ||
| customEffect: (element: Element, progress: number) => { |
There was a problem hiding this comment.
there it is simply customEffect: [CUSTOM_EFFECT_CALLBACK] and the signature and explanation are in the variables section. There are many such mismatches everywhere since we insist on not pulling/copying it from a single source of truth
| key: 'orchestrated-section', | ||
| key: '[TALL_WRAPPER_KEY]', | ||
| trigger: 'viewProgress', | ||
| conditions: ['[CONDITION_NAME]'], // optional |
| // Use keyframeEffect, namedEffect, or customEffect as in Rules 1–2 | ||
| keyframeEffect: { name: '[EFFECT_NAME]', keyframes: [EFFECT_KEYFRAMES] }, |
There was a problem hiding this comment.
then let's not write a template of a keyframeEffect, it is just confusing
| listContainer?: string; // CSS selector for a list container | ||
| listItemSelector?: string; // optional — CSS selector to filter which children of listContainer are selected |
There was a problem hiding this comment.
A suggestion for future design change - models might get less confuse if these were separated from the rest - something like
listSelectors?: {
container: string;
item?: string;
}
There was a problem hiding this comment.
Maybe, I actually wanted to keep it as flat as possible. Also, if it's just 2 properties then not worth it yet. We can consider.
| **Most common**: Omit `selector`/`listContainer`/`listItemSelector` entirely — the element with the matching key is used as both source and target. Use `selector` to target a child element within the keyed element. Use `listContainer` for staggered sequences across list items. | ||
|
|
||
| Generates critical CSS styles that prevent flash-of-unstyled-content (FOUC) for elements with `viewEnter` entrance animations. | ||
| `listItemSelector` is **optional** — only use it when you need to **filter** which children of `listContainer` participate (e.g. select only `.active` items). When omitted, all immediate children of the `listContainer` are selected. |
There was a problem hiding this comment.
This is great, I think the rules in the trigger-files that refer to list-selectors should just refer to integration.md instead for context on how it works
There was a problem hiding this comment.
I'm trying to avoid chaining files
| key: string; // REQUIRED — matches data-interact-key / interactKey | ||
| trigger: TriggerType; // REQUIRED — trigger type | ||
| params?: TriggerParams; // trigger-specific parameters | ||
| selector?: string; // CSS selector to refine target within the element |
There was a problem hiding this comment.
this is confusing - isn't that selector supposed to be on the effect-level? If not, then do all selectors on the interaction-level actually refer to the target and not the source?
| 1. **`listContainer` + `listItemSelector`** — matches only the elements matching `listItemSelector` within the container (filtering). | ||
| 2. **`listContainer` only** — targets all immediate children of the container (common case). | ||
| 3. **`listContainer` + `selector`** — matches via `querySelector` within each immediate child of the container. | ||
| 4. **`selector` only** — matches via `querySelectorAll` within the root element. | ||
| 5. **Fallback** — first child of `<interact-element>` (web) or the root element (react/vanilla). |
There was a problem hiding this comment.
are these on the interaction level used for the target resolving? How does it work with multiple effects on multiple targets?
There was a problem hiding this comment.
It's missing separate text for source and target that's used in full-lean. I'll copy from there.
| | `click` | Mouse click | Same as `hover` | [click.md](./click.md) | | ||
| | `interest` | Accessible hover (hover + focus) | Same as `hover` | [hover.md](./hover.md) | | ||
| | `activate` | Accessible click (click + Enter/Space) | Same as `click` | [click.md](./click.md) | | ||
| | `viewEnter` | Element enters viewport | `type?`: same values as hover; `threshold?`: 0–1; `inset?`: CSS length as strin for viewport margin | [viewenter.md](./viewenter.md) | |
There was a problem hiding this comment.
| | `viewEnter` | Element enters viewport | `type?`: same values as hover; `threshold?`: 0–1; `inset?`: CSS length as strin for viewport margin | [viewenter.md](./viewenter.md) | | |
| | `viewEnter` | Element enters viewport | `type?`: same values as hover; `threshold?`: 0–1; `inset?`: CSS length as string for viewport margin | [viewenter.md](./viewenter.md) | |
| The source element is what the trigger attaches to. Resolved in priority order: | ||
|
|
||
| 1. **`listContainer` + `listItemSelector`** — trigger attaches to each element matching `listItemSelector` within the `listContainer`. Use `listItemSelector` only when you need to **filter** which children participate (e.g. select only `.active` items). If all immediate children should participate, omit `listItemSelector`. | ||
| 2. **`listContainer` only** — trigger attaches to each immediate child of the container. This is the common case for lists. | ||
| 3. **`listContainer` + `selector`** — trigger attaches to the element found via `querySelector` within each immediate child of the container. | ||
| 4. **`selector` only** — trigger attaches to all elements matching `querySelectorAll` within the root `<interact-element>`. | ||
| 5. **Fallback** — first child of `<interact-element>` (web) or the root element (react/vanilla). |
There was a problem hiding this comment.
It speaks here about the source-resolution while in other places the same segment talks about target-resolution. It is unclear whether these apply to the trigger or the target
| The target element is what the effect animates. Resolved in priority order: | ||
|
|
||
| 1. **`Effect.key`** — the `<interact-element>` with matching `data-interact-key`. | ||
| 2. **Registry Effect's `key`** — if the effect is an `EffectRef`, the `key` from the referenced registry entry is used. |
There was a problem hiding this comment.
suggestion for future design - effects in the registry should not have keys, it makes no sense. If they are reusable effect definitions they should be target-less IMO.
|
|
||
| 1. **`Effect.key`** — the `<interact-element>` with matching `data-interact-key`. | ||
| 2. **Registry Effect's `key`** — if the effect is an `EffectRef`, the `key` from the referenced registry entry is used. | ||
| 3. **Fallback to `Interaction.key`** — the source element acts as the target. |
There was a problem hiding this comment.
to the key or to the resolved source element? (those are not necessarily the same)
| 1. **`Effect.key`** — the `<interact-element>` with matching `data-interact-key`. | ||
| 2. **Registry Effect's `key`** — if the effect is an `EffectRef`, the `key` from the referenced registry entry is used. | ||
| 3. **Fallback to `Interaction.key`** — the source element acts as the target. | ||
| 4. After resolving the root target, `selector`, `listContainer`, and `listItemSelector` on the effect further refine which child elements within that target are animated (same priority order as source resolution). |
There was a problem hiding this comment.
This is the only place it becomes clear that these could exist on both interaction and effect level. We need to find a way to make this general and less confusing
packages/interact/rules/full-lean.md
Outdated
| | `Interact.destroy()` | Tear down all instances. Call on unmount or route change to prevent memory leaks. | | ||
| | `Interact.forceReducedMotion` | `boolean` (default: `false`) — force reduced-motion behavior regardless of OS setting. | | ||
| | `Interact.allowA11yTriggers` | `boolean` (default: `false`) — enable accessibility trigger variants (`interest`, `activate`). | | ||
| | `Interact.setup(options)` | Configure global thresholds and observer options for scroll, pointer, and viewEnter systems. Call before `create`. | |
There was a problem hiding this comment.
what are the options? when should one use it?
Description
hover.mdclick.mdviewprogress.mdviewenter.mdpointermove.mdintegration.mdscroll-list.mdfull-lean.md