Sign up and get 15% off every plan.

Sign up
Menu
FormsHeroUIApache-2.0 licenceFree

Text field

A text box with its label, ready for a form.

Add it to your project

Or install the packages yourselfTerminal
npm install @heroui/react

The code

components/text-field-demo.tsxReact
/**
 * 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.