Using event variables
Events in Framer allow actions in components to trigger changes in parent component or on the canvas, such as opening and closing overlays. This guide explains how to add events to create seamless interactions across components.
FAQ
How does Framer handle event variables for nested components?
In most cases, Framer generates event variables automatically when you add interactions to nested components. For example, if a component within another component has an interaction, Framer detects it and sets up the required events.
When should I manually add event variables in Framer?
Manually adding events can be useful for more complex workflows or when you need greater control over when certain interactions trigger.
How can I use a button inside a card to open and close a fixed overlay using event variables?
Design a button component and add an interaction with a new event (e.g., 'Open overlay'). Place the button inside a card component and add another event variable to the card to expose the button’s event. Design a fixed overlay component and, in its settings, set 'Show On' to the 'Open overlay' event. To close the overlay, create a 'Close overlay' event and add an interaction to the overlay component that triggers this event.
Updated