Skip to content

Types of Form Inputs: Which Field to Use for Every Question

Text field, select, combobox, checkbox, radio, switch, slider, date picker, OTP, tags and file upload: which form input fits each question, with live examples.

By , MiniDev7 min read

Every field in a form is a question, and the right input makes the answer quick and correct. The wrong one costs conversions: a dropdown of two options hides them behind a click, a free text field for a date invites ten formats. This guide lists the form inputs you will use, organised by the kind of answer, with best for, avoid when, and a live example of each from MiniDev UI.

Input picker

The answer isUseAvoid
Short free text: name, emailText inputTextarea
Long free text: message, bioTextareaText input
One of 2 to 5 optionsRadio groupSelect
One of 6 to about 15 optionsSelectA long radio list
One of many, or searchableComboboxA select with 200 items
Several of a short listCheckboxesMulti-select
Several of a long listMulti-selectDozens of checkboxes
Free-form labelsTags inputComma-separated text
On or off, applies instantlySwitchCheckbox
A number in a rangeSlider or number inputText input
A date or date rangeDate pickerThree separate selects
A one-time codeOTP inputOne plain text field
A fileFile dropzoneA bare file input
A passwordPassword inputA field with no reveal button

Text inputs

Text input

The single-line field for short answers: names, emails, titles, search terms. Set the right type (email, tel, url) and autocomplete value so phones show the right keyboard and browsers can fill it in.

Best for: short, unpredictable answers. Avoid when: the answer comes from a fixed list; offer the list instead. Tip: the label goes above the field and stays visible; a placeholder alone disappears the moment someone types.

Loading the live Input…
InputA text input with a leading icon.Docs

Textarea

A multi-line field for longer answers: messages, descriptions, feedback. The visible size tells people how much you expect them to write.

Best for: anything longer than a sentence. Avoid when: you need structured data out of it. Tip: show a character count when there is a limit, and let the field grow with the text.

Loading the live Textarea…
TextareaA textarea with a character limit.Docs

Password input

A masked text field with a button to show what was typed. The reveal button cuts typos more than a confirm-password field does.

Best for: sign-up, sign-in and password changes. Avoid when: never avoid the reveal button; people mistype on phones. Tip: set autocomplete="new-password" on sign-up so password managers offer a strong one.

Loading the live Password Input…
Password InputDocs

Choosing from options

Radio group

Radio buttons show all options at once and allow exactly one. Seeing every option is the point: people compare them without opening anything.

Best for: 2 to 5 options, especially when each needs a short description, such as plans or shipping speeds. Avoid when: there are many options; the list gets long. Tip: preselect the most common safe option so the form can be finished faster.

Loading the live Radio Group…
Radio GroupOptions with descriptions.Docs

Select (dropdown)

A select hides its options in a list until clicked and allows one choice. It saves space when the options are many but familiar, like a country or a time zone.

Best for: 6 to about 15 known options. Avoid when: there are only 2 or 3 (use radios) or hundreds (use a combobox). Tip: sort options in an order people expect: alphabetical, numerical, or most common first.

Loading the live Select…
SelectA select with grouped items.Docs

Combobox

A combobox is a select you can type into: it filters the options as you type. It turns a list of 200 countries or 5,000 products into a few keystrokes.

Best for: long lists, data from a server, anything people know by name. Avoid when: people do not know what the options are; they need to browse, so show them. Tip: match anywhere in the label, not just the start, and show a clear empty state.

Loading the live Combobox…
ComboboxDocs

Checkbox

A checkbox is an independent yes or no. A group of checkboxes lets people pick any number of options, and a single checkbox is for agreeing to something before submitting.

Best for: a short list of multiple choices, terms acceptance, filters. Avoid when: the setting applies instantly (use a switch) or only one option is allowed (use radios). Tip: a select all checkbox with an indeterminate state saves clicks in tables.

Loading the live Checkbox…
CheckboxSelect all with an indeterminate state.Docs

Multi-select

A multi-select is a searchable dropdown that allows several choices, shown as chips in the field. It handles long lists where checkboxes would fill the screen.

Best for: assigning people, choosing skills, picking categories from a long list. Avoid when: the list is short; checkboxes show all options at once. Tip: show the selected count when there are more chips than fit.

Loading the live Multi Select…
Multi SelectDocs

Tags input

A tags input turns typed text into chips when you press Enter or a comma. Unlike a multi-select, the values are free-form.

Best for: labels, keywords, email recipients. Avoid when: values must come from a fixed list; use a multi-select. Tip: handle pasting a comma-separated list, and stop duplicates.

Loading the live Tags Input…
Tags InputDocs

Switch

A switch is an on or off control that takes effect immediately, like a light switch. Because it acts at once, it does not belong in a form with a Save button.

Best for: settings and preferences that apply instantly: notifications, dark mode, feature flags. Avoid when: the change is saved with a form; use a checkbox. Tip: the label says what is on (Email digests), not an instruction (Turn on email digests).

Loading the live Switch…
SwitchSettings rows that apply instantly.Docs

Numbers, dates and codes

Slider

A slider picks a value by dragging along a track. It is quick and visual when the exact number matters less than the rough position.

Best for: budgets, price filters, volume and opacity. Avoid when: people need an exact value, such as a quantity of 37; pair the slider with a number field or use a number input. Tip: show the current value next to the thumb.

Loading the live Slider…
SliderA slider formatted as currency.Docs

Number input

A field for exact numbers with plus and minus steppers, min, max and step rules.

Best for: quantities, seats, ages, limits. Avoid when: the number is an identifier such as a card or phone number; those are text with formatting. Tip: allow typing as well as stepping, and clamp to the limits on blur.

Loading the live Number Input…
Number InputDocs

Date picker

A date picker combines a text field with a calendar. A date range picker selects a start and an end, often with presets such as Last 30 days.

Best for: bookings, due dates, report ranges. Avoid when: the date is a birthday decades ago; typing is faster than paging back through a calendar. Tip: show the format and accept typed dates in it. See the date range picker guide.

Loading the live Date Range Picker…
Date Range PickerA date range picker with presets.Docs

OTP input

A one-time code field split into one box per digit. It shows how long the code is and supports pasting and SMS autofill.

Best for: two-factor codes, email and phone verification. Avoid when: the code is long or alphanumeric beyond eight characters. Tip: set autocomplete="one-time-code" and verify automatically when the last digit is entered. More in the OTP input guide.

Loading the live Otp Input…
Otp InputVerifies when the last digit is entered.Docs

File dropzone

A drop area that accepts dragged files and opens the file browser on click, with a list of selected files and their progress.

Best for: documents, images, CSV imports. Avoid when: a single small avatar; an avatar upload control is clearer. Tip: state the accepted types and size limit before the upload, not after it fails. See the file upload guide.

Loading the live File Dropzone…
File DropzoneAccepted types and a size limit up front.Docs

Rules that apply to every field

  • A visible label above every field. Placeholders are hints, not labels.
  • Mark the exception: if most fields are required, mark the optional ones.
  • Validate on blur, not on every keystroke, and say how to fix the error next to the field.
  • Group related fields (address, card details) and keep one column; multi-column forms are skipped.
  • Ask for less. Every field you remove raises completion. Ask for the rest after sign-up.

Wrap any input in a form field component that wires the label, description and error message to the control. It keeps forms accessible without thinking about aria-describedby every time.

Loading the live Form Field…
Form FieldLabel, help text and error wired to the control.Docs

Every input on this page is a free React component. Install one with npx shadcn@latest add @minidev/combobox, or see the full forms category.

Components used in this guide

Frequently asked questions

What are the main types of form inputs?

Text inputs and textareas for free text; radio groups, selects and comboboxes for one choice; checkboxes, multi-selects and tags inputs for several; switches for instant on and off; and sliders, number inputs, date pickers, OTP inputs and file uploads for specific kinds of data.

When should I use radio buttons instead of a dropdown?

Use radio buttons for 2 to 5 options, so people see and compare them all without a click. Use a dropdown (select) for 6 to about 15 known options, and a combobox for longer or searchable lists.

What is the difference between a checkbox and a switch?

A switch applies its setting immediately, like a light switch. A checkbox records a choice that is saved when the form is submitted. Do not put switches in a form with a Save button.

What is the difference between a select and a combobox?

A select shows a fixed list you scroll through. A combobox lets you type to filter the list, which suits long lists such as countries, users or products.

Should I use a placeholder instead of a label?

No. The placeholder disappears as soon as someone types, which hurts memory, accessibility and error correction. Use a visible label above the field and keep placeholders for examples.

How do I make form inputs accessible?

Give every field a visible label tied to it, link help text and errors with aria-describedby, keep focus styles visible, support the keyboard, and set the right type and autocomplete attributes.

More guides