Controlled Inputs interview questions
Practice 12 questions on controlled inputs. Each runs in a real in-browser editor with Jest tests and a worked, diagram-backed solution.
12 questions
- EASY
Accordion
Build an accordion component with stacked sections whose content panels expand and collapse on click.
20 minUI / FrameworksGoogle · Amazon · MetaAngularReactHTML / CSS / JSVue - EASY
Character Counter Textarea
Build a textarea with a live character counter that warns as it nears a maximum length.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - EASY
Contact Form
Build a contact form that posts the user's name, email, and message to a backend endpoint.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - EASY
Flight Booker
Build a small form that books either a one-way or return flight, with validation tying the two date fields together.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - EASY
Mortgage Calculator
Build a calculator that computes the monthly payment for a loan based on principal, rate, and term inputs.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - EASY
Password Strength Meter
Build a password field with a live strength meter that scores the input as you type.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - EASY
Temperature Converter
Build a widget that converts between Celsius and Fahrenheit, updating either field as the other changes.
15 minUI / FrameworksAngularReactHTML / CSS / JSVue - MEDIUM
Star Rating
Build a star rating component where users click a star to set the rating shown by filled icons.
25 minUI / FrameworksAngularReactHTML / CSS / JSVue - MEDIUM
useControllableValue
PREMIUMImplement a hook that lets one component work both controlled and uncontrolled, deciding the mode from its props.
25 minJavaScript - MEDIUM
useInputControl
Implement a hook that manages a controlled input value alongside its dirty and touched flags.
25 minJavaScript - HARD
Auth Code Input
PREMIUMBuild a six-cell auth code input that handles typing, paste, backspace, and arrow-key navigation across fields.
40 minUI / FrameworksAngularReactHTML / CSS / JSVue - HARD
Nested Checkboxes
PREMIUMBuild a nested checkbox tree where parent state reflects its children and toggling a parent cascades down.
40 minUI / FrameworksAngularReactHTML / CSS / JSVue