MUI

Input

Forms 1

About

Here is Input component

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Input to your project and fits it to your theme.

Code

How Input is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import * as React from 'react';
import { Field } from '@base-ui-components/react/field';

export default function ExampleField() {
  return (
    <Field.Root className="flex w-full max-w-64 flex-col items-start gap-1">
      <Field.Label className="text-sm font-medium text-gray-900">Name</Field.Label>
      <Field.Control
        required
        placeholder="Required"
        className="h-10 w-full rounded-md border border-gray-200 pl-3.5 text-base text-gray-900 focus:outline focus:outline-2 focus:-outline-offset-1 focus:outline-blue-800"
      />
      <Field.Error className="text-sm text-red-800" match="valueMissing">
        Please enter your name
      </Field.Error>

      <Field.Description className="text-sm text-gray-600">
        Visible on your profile
      </Field.Description>
    </Field.Root>
  );
}

Dependencies

More by MUI

View all
  • Toast

    Toast

    41
  • Preview Card

    Preview Card

    40
  • Scroll Area

    Scroll Area

    34
  • Select

    Select

    29
  • Number Field

    Number Field

    27
  • Popover

    Popover

    24
  • Accordion

    Accordion

    23
  • Navigation Menu

    Navigation Menu

    15

More in Forms

View all
  • Premium Auth

    Premium Auth

    495
  • Authentication Card

    Authentication Card

    44
  • Login 1

    Login 1

    52
  • Login 2

    Login 2

    7
  • Form

    Form

    31
  • Card Studio

    Card Studio

    41
  • Login Card

    Login Card

    32
  • Form

    Form

    136