Inputs, binding, and form state.
Bind inputs to state for two-way data binding:
state email = "" input bind=email type="email" placeholder="Enter email" p email
state message = "" textarea bind=message placeholder="Your message"
Use the -> operator to handle button clicks:
state submitted = 0 button "Submit" -> submitted = 1 p submitted
state name = "" state email = "" state count = 0 section { style { bg #0a0a1a, padding 2rem, radius 12px } h2 "Contact Form" input bind=name placeholder="Name" input bind=email type="email" placeholder="Email" button "Submit" -> count = count + 1 p count }
CSRF tokens for form submissions are planned for v0.4.