Documentation Index
Fetch the complete documentation index at: https://mintlify.com/finsweet/attributes/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Mirror Click attribute allows you to mirror click events from one element to another. When a user clicks the trigger element, a click event is automatically fired on the target element, enabling you to create custom click handlers and improve user interactions.Attribute Syntax
Elements
Defines the role of the element:
trigger- The element that users clicktarget- The element that receives the mirrored click event
Settings
Defines a delay (in milliseconds) before the click event is replicated on the target element.
Usage Examples
Common Use Cases
Expandable Click Areas
Make entire cards or containers clickable by mirroring clicks to a hidden link or button inside them.Custom Form Controls
Create custom-styled buttons that trigger native form submissions or file inputs.Modal Triggers
Allow multiple elements to open the same modal by mirroring clicks to the modal trigger button.Enhanced Navigation
Create large, custom navigation elements that trigger standard navigation links.Interaction Chaining
Trigger Webflow interactions by mirroring clicks to elements with interaction triggers.Accessibility Improvements
Make non-interactive elements (like cards) clickable while maintaining a proper link target for screen readers.Implementation Patterns
Card Links
Delayed Animations
How It Works
- The trigger element listens for click events
- When clicked, it finds the corresponding target element
- After the specified delay (if any), it programmatically clicks the target
- Any click handlers or interactions on the target are triggered
Mirror Click works with any clickable element including buttons, links, and form inputs. The target element will behave as if it was clicked directly by the user.
Accessibility Considerations
- Ensure the target element is semantically appropriate (use
<a>for links,<button>for actions) - Keep the target element in the DOM (don’t use
display: none) if you need it to be accessible to screen readers - Consider using
aria-labelon trigger elements to provide context - Test keyboard navigation to ensure interactive elements remain accessible