A string input field.
useForm()
import React from "react"; import { Forms, useForm, showToast } from "attio/client"; export function FormTextInputDialog() { const { Form, SubmitButton, TextInput } = useForm( { firstName: Forms.string(), lastName: Forms.string(), }, { firstName: "", lastName: "", }, ); return ( <Form onSubmit={async (values) => { await showToast({ title: "Form submitted", variant: "success", text: JSON.stringify(values), }); }} > <TextInput label="First name" name="firstName" /> <TextInput label="Last name" name="lastName" /> <SubmitButton label="Submit" /> </Form> ); }
string
"name"
"shipping.address.street"
text
email
password
tel
url
"text"
false
Was this page helpful?