Not sure which lesson to do first? Find your level and get a plan →

CS Thinking · Software Design & Development · Grade 6-8

User Interface

The visual elements and interaction methods through which a user communicates with a computing system — including buttons, menus, text fields, icons, and layout.


Quick Answer

The visual elements and interaction methods through which a user communicates with a computing system — including buttons, menus, text fields, icons, and layout. Design it around what the user is trying to do: show the few controls the task needs, keep them looking and behaving the same on every screen, and answer every action with feedback, such as a spinner or the word 'Saved'. A good UI lets a newcomer finish the task without instructions, and you check that by watching real users try.

Why This Matters

A feature people cannot find might as well not exist. A form that clears itself after one typo, a Delete button right beside Save, or a tap with no visible response makes users give up or make mistakes, even when the code underneath is correct. UI design turns working code into software people can actually use, and it is judged by watching real users do real tasks, not by opinions.

Intuitive Explanation

Compare two microwaves. One has a single dial and a Start button; you turn it to 2 minutes and press Start. The other has 24 buttons, including 'Defrost poultry by weight', and its display stays blank while you press them. Both heat food equally well. The first has the better user interface: the controls you need are obvious, and the countdown on the display tells you it understood.

Three ideas explain most good UI. Clarity: show what this task needs and hide the rest until someone asks for it. Consistency: put the Back button in the same corner on every screen and use one colour for every confirm action, so what you learn on one screen works on the next. Feedback: every action gets a visible response within about a second, such as a spinner, a tick, or an error message beside the field that needs fixing. Missing feedback is why people tap Pay twice.

A user interface is not the same as a software interface. The inputs a function accepts form a contract between two pieces of code that no person ever sees; the UI is where a person meets the program. Accessibility is related but more specific: it asks whether people with different abilities, such as someone using a screen reader or only a keyboard, can use the UI at all.

Think of it like this. A good UI works like a well-signposted airport: you reach your gate without asking anyone, because signs sit where you look, use the same symbols throughout, and keep confirming you are heading the right way. A confusing airport and a confusing app fail the same way: people get lost even though everything they need is there.

Core idea. Good UI design follows principles of clarity, consistency, and feedback. The user should always know what's happening and what they can do next.


When to Use

Think about the user interface when a problem describes buttons, screens, menus or forms, asks why users make mistakes or abandon a task, or quotes user feedback saying an app is confusing. Judge it by clarity, consistency and feedback, and test it by watching people attempt a task. If the question is about how two pieces of code exchange data, that is a software interface; if it is about whether people with disabilities can use it, focus on accessibility.

Tip. Ask: Is the question about what a person sees and touches on the screen to use the program, and how easy that is?

How to Recognize It

Check who is on each side, a person or other pieces of code, and what makes the program easy or hard to use.

  1. Is a person, rather than other code, on the other side of the boundary?

    Yes means a user interface. Inputs and outputs passed between code modules form a software Interface instead.

  2. Is the question about the layout, labels, buttons or feedback a user gets?

    Yes means UI design: judge it by clarity, consistency and feedback. A question about what code runs when a button is pressed is about the Event Handler behind it.

  3. Must people who cannot see the screen, use a mouse or hear sound be able to use it too?

    Yes means Accessibility, the part of UI design that adds screen-reader labels, keyboard controls and captions so that everyone can use the program.

  4. Is the question about whether real users can finish a task, such as how long it takes or where they get stuck?

    Yes means usability testing: watch users try the task and note each hesitation. Correct code alone does not make a UI easy to use.

User Interface vs Interface vs Accessibility vs Event Handler

A button belongs to the user interface, its code runs through an event handler, everyone should be able to use it, and two names share a word. Ask whether you mean what a person sees, code talking to code, use by people with disabilities, or the code that responds.

User Interface

Meaning
A user interface is the screens, buttons, menus and messages a person uses to work a program.
Key test
A person sees and touches it; judge it by how easily tasks get done.
Example
A music app's play button, its progress bar and the message 'Added to playlist'.

Interface

Meaning
A software interface is the set of inputs, outputs and rules through which one part of code uses another.
Key test
Used by code and never seen by the user.
Example
play(song_id) returning True when playback starts is a software interface.

Accessibility

Meaning
Accessibility is designing a program so that people with disabilities can use it as well as anyone else.
Key test
Can people who cannot see, hear or use a mouse still finish the task?
Example
A play button that a screen reader announces as 'Play' and that the space bar can press.

Event Handler

Meaning
An event handler is the function that runs when a user acts on the interface, such as by clicking a button.
Key test
The code behind the button, not the button itself.
Example
play_button.onclick = start_song makes start_song run on every click.

Formula & Notation

Worked Examples

Example 1 — Repair a sign-up form

Easy

A club's sign-up form has 14 fields (including fax number and favourite colour), a grey Submit button that looks switched off, and after you press it nothing on screen changes for 6 seconds. The club needs only name, email and year group. Suggest three changes and the principle behind each.
Show the steps and the answer
  1. Cut the form to the 3 fields the club uses: name, email, year group.

    Clarity: 11 of the 14 fields collect nothing the club needs, and each one is another reason to give up.

  2. Give Submit the same solid colour and style as the other main buttons on the site.

    Consistency: users learn what an active button looks like, and grey usually means 'not available'.

  3. Show 'Sending...' with a spinner the instant Submit is pressed, then 'You're signed up' when it finishes.

    Feedback: six silent seconds look like failure, so people press again and may sign up twice.

Answer: Reduce the form to 3 fields (clarity), style Submit like the other active buttons (consistency), and show 'Sending...' and then a confirmation (feedback).

Takeaway: Check a screen against clarity, consistency and feedback; each failure points to a specific change.

Example 2 — UI problem or program bug?

Standard

Users of a homework app report two problems. (a) 'When I tap Save nothing seems to happen, so I tap it 3 more times.' The database holds 4 identical copies of the homework. (b) 'When I tap Save, my homework is gone the next day.' The database holds no copy at all. Which is a user-interface problem and which is a bug in the program?
Show the steps and the answer
  1. (a) Check what the system did: it saved once for every tap, exactly as instructed.

    The code did its job; the user simply could not tell. The missing piece is feedback, so this is a UI problem.

  2. Fix (a): show 'Saved' with a tick for 2 seconds after each save, and disable the button while a save is running.

    Visible confirmation stops the extra taps, and the disabled button prevents duplicates even if someone taps anyway.

  3. (b) Check what the system did: nothing was stored.

    No change to the screen can recover data that was never written; this is a logic bug to debug in the save code.

Answer: (a) is a UI problem (no feedback, causing 4 duplicate saves); fix it with a 'Saved' message and a disabled button during saving. (b) is a program bug; the save code must be debugged.

Takeaway: If the program did the right thing but the user could not tell, fix the UI; if the program did the wrong thing, fix the code.

Example 3 — Find the mistake: a Back button that keeps moving

Application

Ravi designs 3 screens for a recipe app. On the Recipe screen, Back is a blue arrow at the top left; on Shopping List it is a red word at the bottom right; on Settings it is a grey icon at the top right. He says: 'Each screen looks different, which makes the app more interesting.' In a test, 4 of 5 users tap the wrong spot when trying to leave Settings. Find the mistake and correct it.
Show the steps and the answer
  1. Link the result to the design: users tapped where Back had been on the earlier screens.

    4 of 5 users, 80%, failing one simple task points to the design, not to careless users.

  2. Name the principle that was broken: consistency.

    People learn where navigation lives once and expect it everywhere; moving and recolouring Back makes them relearn it on every screen.

  3. Fix it: put Back at the top left with the same arrow and colour on all 3 screens, and let photos and recipe colours carry the variety.

    The controls stay predictable while each screen still has its own look.

  4. Retest with 5 new users and count wrong taps.

    The fix counts only if the measurement improves, ideally to 0 or 1 wrong taps.

Answer: The mistake is inconsistent navigation. Put Back in the same place with the same look on every screen, keep the variety in the content, then retest with new users.

Takeaway: Keep controls in the same place and style everywhere, and judge a UI by what users actually do.

Where You'll See It

  • A TV remote with too many buttons

    A cluttered remote where you can never find the right button is bad UI; a streaming app's simple play/pause layout is good UI — same goal, very different ease of use.

  • A 'loading' spinner after you tap a button

    Good UI gives feedback: when you tap 'send' and see a spinner or checkmark, you know the action registered; with no feedback you tap again and again, unsure if it worked.

  • App menus that stay in the same place

    Consistency means the back button and menu are in the same spot on every screen; when they move around, even simple tasks become frustrating to learn.

Common Mistakes

  1. The slip: A good UI is one that shows the user every feature and option available.

    Why it's tempting: More options look powerful and seem to give the user more control.

    Instead: Cramming in too many controls overwhelms users; good UI favors clarity, showing what's relevant and hiding complexity until it's needed.

  2. The slip: The user interface is the same thing as a software interface (the code contract).

    Why it's tempting: Both are called 'interface.'

    Instead: A user interface is what a human sees and interacts with (buttons, menus, screens); a software interface is the contract between code modules.

  3. The slip: If the action worked, the program doesn't need to tell the user anything.

    Why it's tempting: From the programmer's side the action clearly succeeded, so a confirmation seems unnecessary.

    Instead: Good UI provides feedback after every action so the user knows it was registered; silence leaves users uncertain and prone to repeating the action.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. After clicking Save on a form, nothing on screen changes for 5 seconds while the file saves. Which UI principle is missing, and what would you add?

    Hint: How does the user know the click worked?

  2. Screen 1 has a green 'Next' button at the bottom right. Screen 2 has a blue 'Continue' link at the top left for the same action. Which principle is broken, and how do you fix it?

    Hint: Same action, different look and place.

  3. A touch button is 20 × 20 pixels, but a common guideline suggests at least 44 × 44. By how many times must its area grow?

    Hint: Compare the two areas in square pixels.

  4. An icon-only button shows a cloud with an up arrow. In testing, 5 of 10 users did not know it meant 'upload'. Which principle is the problem, and what is a simple fix?

    Hint: Can a new user tell what the button does at a glance?

  5. Question A: should the Send button say 'Send' or 'Submit', and where should it go? Question B: how does the program read the typed text and save it to the database? Which is a user interface question?

    Hint: Which question is about what the user sees and touches?

  6. A student designs a calculator home screen with 60 buttons, including rarely used functions, saying: 'More buttons on screen make it easier to use.' Correct them.

    Hint: How does a crowded screen affect finding the common buttons?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

What is the difference between UI and UX?

UI, the user interface, is the part you can see and touch: buttons, colors, text, layout. UX, the user experience, is how the whole thing feels to use, from finding the app to finishing the task and getting help when something fails. A beautiful screen can still give a bad experience if the task takes eight taps. UX designers often start with interviews and sketches before any UI is drawn.

Why do so many apps look alike?

Because users bring habits from other apps, and matching them saves learning time. A magnifying glass for search, a gear for settings and a three-line menu icon in a corner work because people have seen them everywhere. Apple and Google publish design guidelines for their phones so that apps on each platform behave the same way. Breaking a habit, such as putting Cancel where Save usually sits, causes mistakes even if it looks fresh.

What is a wireframe?

A wireframe is a quick sketch of a screen that shows where things go, such as the title, the buttons and the list, without colors, pictures or real text. Designers draw several on paper or in a design tool, try them out on a few users, and only then make the polished version. Changing a wireframe takes minutes, while changing a finished, coded screen can take days.

Is a voice assistant a user interface?

Yes, a voice user interface: you speak instead of tapping, and it answers out loud. The same design rules apply in a new form. It needs feedback, such as a chime or a light to show it is listening, and it must tell you what you can ask, because there are no buttons to look at. Command-line programs, where you type text commands, are another kind of user interface with no graphics at all.

Learning Path

← Before

Input/Output
User Interface

You are here

Next →

Accessibility
You should know Input/Output: how a program receives data and shows results. A user interface adds the design of that exchange for people: the layout, controls and feedback that make input easy and output understandable. Next, Accessibility makes sure the same interface works for everyone, including people who use screen readers, keyboard-only navigation or larger text.

See Also