Form
The basic building block of any website or application is the form. If you don't need a database backend, you can use the form generator to create a simple form. Ideal for contact or feedback forms where the data isn't persisted.
Syntax
$ vela generate form <name> [fields...] $ vela generate form contact name:string email:string message:text This will create a form at /contact and a Zod schema definition for form validation.
The files created are:
src/routes/contact/+page.svelte
src/routes/contact/+page.server.ts
src/lib/schemas/contact.ts
AI
ProThe generate form command supports the --ai option for freeform text input in place of
specifying the fields.
$ vela generate form contact --ai "a feedback form with a 1-5 star rating"