Text field
A text box with its label, ready for a form.
A text box with its label, ready for a form.
npm install @heroui/react
First time with HeroUI? Set it up once.
/**
* Demo from HeroUI, https://heroui.com (docs example textfield/basic.tsx).
* Apache-2.0, Copyright 2025 NextUI Inc. Full text: https://github.com/heroui-inc/heroui/blob/main/LICENSE
* Changed for Tastebud: a default export (HeroUI's docs use named ones) without the docs site's prop
* controls.
*/
import {Input, Label, TextField} from "@heroui/react";
export default function TextFieldDemo() {
return (
<TextField className="w-full max-w-64" name="email" type="email">
<Label>Email</Label>
<Input placeholder="Enter your email" />
</TextField>
);
}
Changed for this site: A default export (HeroUI's docs use named ones) without the docs site's prop controls.