> Markdown version of [Add Listeners](https://vaadin.com/docs/next/tools/copilot/features/listeners). Section index: [llms.txt](https://vaadin.com/docs/next/tools/llms.txt)

# Add Listeners

To make a component do something, add a listener to it. Copilot writes the stub, and your IDE opens at it, ready for the code.

Add a click listener to a button

1. Right-click a component, point at **Add Listener**, and choose one, here **Add Click Listener**.

   [![Your browser does not support the video tag.](../../../vaadin/videos/copilot/listeners/01-menu.jpg)](../../../vaadin/videos/copilot/listeners/01-menu.mp4)

2. Copilot adds the listener to ContactView\.java, and your IDE opens at it.

   [![Your browser does not support the video tag.](../../../vaadin/videos/copilot/listeners/02-ide.jpg)](../../../vaadin/videos/copilot/listeners/02-ide.mp4)

Your IDE opens at the listener when you have the Vaadin plugin for your IDE. See [IDE Integration](https://vaadin.com/docs/next/tools/copilot.md#ide-integration).
