Skip to content
F
GitHub Light theme

Flowmark Events

Use (click) in Astro. Skip the listener boilerplate.

The events compiler brings Angular's event-binding DX to plain Astro markup. Write handlers in a <script data-flowmark> block, use (event)="handler()" in the template, and Flowmark wires up native browser listeners for you — no bundler tricks, no framework runtime.

Live Astro page Compiled from (click) and (input)

Click an action to see the compiled event handlers run.

$event $el literal args native events
Author in Astro .astro
Compiler output HTML + JS
01

Write event intent in markup

Use `(click)`, `(input)`, or any native event name where the user action happens.

02

Validate handlers at build time

Flowmark checks that every `(event)="handler()"` reference resolves to a function declared in your `<script data-flowmark>` block — no manual wiring, no runtime surprises.

03

Bind native listeners at runtime

The browser receives data attributes plus a small runtime that calls `addEventListener` for you.