To add interactivity to your components, you'll probably want to add some event handlers. Lit makes it easy to add a declarative event listener in the template, using an expression like this:

Here we've provided a name tag component with a message and an input element. In this step you'll use a declarative event listener so the component can handle input events.

Try it out by entering a name.

For more information about declarative event handlers, see Events.