--- id: quick-start title: Quick Start --- The bare minimum to get started with TanStack Form is to create a `TanStackFormController` as seen below with the `Employee` interface for our test form: ```ts interface Employee { firstName: string lastName: string employed: boolean jobTitle: string } #form = new TanStackFormController(this, { defaultValues: { firstName: '', lastName: '', employed: false, jobTitle: '', } as Employee, }) ``` In this example `this` references the instance of your `LitElement` in which you want to use TanStack Form. To wire a form element in your template up with TanStack Form, use the `field` method of `TanStackFormController`. The first parameter of `field` is `FieldOptions` and the second is callback to render your element. ```ts field(FieldOptions, callback) ``` Our completed test form should look something like below. The form collects first name from a user input field: ```ts export class TestForm extends LitElement { #form = new TanStackFormController(this, { defaultValues: { firstName: '', lastName: '', employed: false, jobTitle: '', } as Employee, }) render() { return html`
Please enter your first name
${this.#form.field( { name: `firstName`, validators: { onChange: ({ value }) => value.length < 3 ? 'Not long enough' : undefined, }, }, (field) => { return html`