Forms and selection · stable · MIT

Input

A native single-line field with descriptions, adornments, and feedback.

Install editable source

Add Input

Base UI / canonicalnpx shadcn@latest add https://gummyui.dev/r/gummy-input.json

No package dependency beyond React. Shared Gummy material is resolved automatically.

Behavior contract

Semantics before surface

Semantics

Visible label and generated described-by/error relationships.

Keyboard

Native input editing and selection.

System support

Light and dark themes, logical RTL layout, reduced motion, responsive content, and forwarded public refs.

Source-derived reference

Anatomy and public API

Exported anatomy

These public React parts are read directly from the canonical source during the documentation build.

  • GummyInput

Prop contracts

GummyInputProps

Composes Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & { label: React.ReactNode; description?: React.ReactNode; errorMessage?: React.ReactNode; successMessage?: React.ReactNode; leadingAdornment?: React.ReactNode; trailingAdornment?: React.ReactNode; wrapperClassName?: string; }

Troubleshooting

Check behavior before surface.

Implementation decisions

When to use Input

Use a text field when someone can enter a concise value that the service will validate and store or act on. Choose the native type, autocomplete purpose, input mode, and accessible name from the data contract rather than the desired appearance. Keep formatting hints outside the placeholder and preserve the entered value after recoverable errors. Test paste, autofill, mobile keyboards, invalid server responses, long unbroken values, zoom, and sensitive-data handling before shipping the form.

Live product source

Inspect the canonical states

The Component Lab exercises real source across default, focus, disabled, responsive, dark, reduced-motion, and RTL contexts.

Open the live Component Lab

Interactive inspection

Try Input in context

Load the real component preview when you are ready to interact with its responsive, theme, and direction controls.

Editable source

Read before you install

Canonical Base UI or native source

The registry payload stays off the initial page request.