Dev Helpers

React / Forms

Native reset form

Dev Helpers · March 21, 2026

A native reset restores a form's default values. A controlled React field derives its value from state and may need an explicit state reset.

Worked example

// components/NativeResetForm.tsx

export default function NativeResetForm({
  label = "Email",
  initial = "",
}: { label?: string; initial?: string } = {}) {
  return (
    <form>
      <label>
        {label}
        <input defaultValue={initial} />
      </label>
      <button type="reset">Restore original</button>
    </form>
  );
}

Implementation notes

A reset action is different from clearing the form. Preserve defaults the user reasonably expects to return after reset.

Try it yourself

Change a default field and a controlled field in the same form.

Open the React example →

Editorial date March 21, 2026 · Published December 6, 2026

Related articles

Percentage meter

A percentage meter needs both a bounded visual fill and a meaningful textual value. Handle a zero denominator before dividing.

Vertical typesetting sample

Vertical typesetting changes the reading direction and available inline space. Treat the sample text as content so it remains selectable and accessible.

Square cover crop

A square image crop gives a card grid consistent geometry. The crop anchor determines whether the most important part of a photo survives.