Parameters
Optional placeholder text displayed when the field is empty.
The current text value of the field.
Function called when the text changes.
A text input field for user text entry.
TextField(props: { placeholder?: string; text: string; setText: (text: string) => void }): Component;
const [name, setName] = useState("")
TextField({
placeholder: "Enter your name",
text: name,
setText: setName
})
const [email, setEmail] = useState("")
VStack([
TextField({
placeholder: "Enter email address",
text: email,
setText: setEmail
}),
Button("Submit", () => {
console.log("Email:", email)
})
])