Segmented Control
A row of two to five connected buttons where exactly one is selected. Here's what it looks like, when it's the right choice, and how testers break it.
Open the Calendar app on an iPhone and look at the top: Day · Week · Month · Year. Tap one and the view below changes. That small bar of connected buttons is a segmented controlSegmented controlA row of connected buttons where exactly one option is selected at a time.Open in glossary →, and you’ll find it in almost every app: maps, banking, fitness, shopping filters.
It looks simple, and that’s exactly why bugs slip through. Let’s learn it properly.
What is a segmented control?
A segmented control is a horizontal set of 2–5 options shown as one connected control. The options are mutually exclusiveMutually exclusiveOptions where choosing one automatically means the others can't be chosen.Open in glossary →, so selecting one deselects the others. Think of it as radio buttons dressed up as a single button bar.
You’ll usually see it used to:
- Switch between views of the same content: List / Map in a restaurant app, Day / Week / Month in a calendar.
- Filter content: All / Unread in a mail app, Income / Expenses in a banking app.
- Pick a setting with a few options: Walk / Transit / Drive in a maps app.
Anatomy
- 1
Container (track)
The background that groups all segments together.
- 2
Segment
One option. All segments usually have equal width.
- 3
Selected indicator (thumb)
Shows which segment is active. On iOS it slides.
- 4
Label
Short text (1-2 words) or an icon describing the option.
- 5
Divider
Thin line between unselected segments.
How it differs from similar components
Beginners often mix these up. Knowing the differences helps you spot when the wrong component was used, and that’s a valid finding too.
| Component | Choices | Selection | Typical use |
|---|---|---|---|
| Segmented control | 2–5, short labels | Exactly one | Switch views or filter, right where the content is |
| Tabs | 2–7+ | Exactly one | Navigate between different sections or screens |
| Radio buttons | ~2–6 | Exactly one | Forms, especially with long labels or descriptions |
| Toggle switch | 1 (on/off) | On or off | A setting that takes effect immediately |
| Dropdown | Many | One (or more) | Saving space when there are 5+ options |
| Chips | Any | One or many | Filters, tags, multiple selection |
Dev note
Apple calls it a segmented control. Google’s Material Design calls it a segmented button. On the web it’s often called a button group or toggle group. In bug reports, use the name your team uses.
Designs & variants
The same idea looks different on every platform. Each variant comes with its own risks.
Tap the controls, they all work. Use the switch to compare light and dark appearance.
Classic text
iOSThe standard iOS look: a grey track with a white thumb that slides to the selected segment.
Segmented button
Android · Material 3Outlined pill. The selected segment gets a tinted background and a checkmark.
Button group
WebCommon on websites and dashboards. Often built by hand, so it's where bugs hide.
Icons only
iOS · WebSaves space, but icons need an accessible name or screen readers say just 'button'.
Icon + text
iOSIcons help scanning. Check they stay aligned with the label at every text size.
With counters
iOS · WebBadges show how many items each view holds. Test 0, 1, 99 and 1000+.
Multi-select
Android · Material 3Material allows choosing several segments at once. iOS segmented controls never do this.
With a disabled segment
AllA segment can be unavailable. It must look disabled and must not react to taps or keys.
When to use it
A segmented control is a good choice when:
- There are 2 to 5 options, and all of them fit with short labels (1–2 words).
- The options are related and mutually exclusive: you can only look at one time range at a time.
- The user will switch often and wants to see all options at once.
- The change applies immediately to content on the same screen, with no “Save” button.
Good and bad uses
Short, related views
Two views of the same restaurants. Short labels, instant switch.
Too many options
Seven cramped segments that are hard to tap. Use a dropdown, a date picker or scrollable tabs instead.
Mutually exclusive filter
You see one list or the other, never both.
Actions instead of choices
These are commands, not states. Nothing should stay “selected” after you share something. Use regular buttons.
Settings with a few clear values
Three short, exclusive values.
Long labels or on/off settings
Labels get truncated, and an on/off choice is clearer as a toggle switch.
Common bugs
These are the bugs testers report most often for segmented controls. Learn the patterns and you’ll spot them in seconds.
| # | Bug | What you see | Typical severity |
|---|---|---|---|
| 1 | No default selection | The screen loads with no segment highlighted, or the highlighted one doesn’t match the content | Medium |
| 2 | Content doesn’t match selection | “Day” is selected but the chart shows yearly data, often after fast tapping | High |
| 3 | State is lost | Selection jumps back to the first segment after rotating, going back or returning from the background | Medium |
| 4 | Label truncation | “Mon…” or clipped text in other languages or with large text | Medium |
| 5 | Invisible selection | In dark mode or high contrast, you can’t tell which segment is active | Medium–High |
| 6 | Double requests | Tapping the selected segment again reloads data; fast taps fire many API calls | Low–Medium |
| 7 | Tiny touch targets | Segments smaller than 44 pt (iOS) / 48 dp (Android) are hard to hit and you tap the wrong one | Medium |
| 8 | Screen reader silence | VoiceOver or TalkBack doesn’t say which segment is selected, or reads “button, button” | High (for affected users) |
| 9 | Disabled segment still works | A greyed-out option can still be tapped or selected with the keyboard | Medium |
| 10 | Animation glitches | The thumb lands between segments or flickers when you switch quickly | Low |
Stress-test it
Good testers don’t stop at “it works”. They push the component to its limits. Try a German translation, a narrow screen and 160% text size:
🧪 Stress-test playground
Testers break components by pushing them to extremes. Change the settings and watch what happens.
Showing: Day
Looks good. Now try German, a narrow screen, or 160% text size.
Find the bug
Time to practice. The fitness app below has a segmented control with six bugs. Explore it the way a real tester would:
- Tap segments slowly, then quickly.
- Open an activity and come back.
- Change the device settings.
- Watch the network log.
🐞 Bug hunt: Activity screen
This demo has 6 hidden bugs. Explore it like a tester, then check your findings.
Activity
Steps this week
48,210
Recent
Device settings
Network log
- Tap a segment to see API requests…
- 1
Hint: Look carefully right after the app starts.
- 2
Hint: Tap Year and then Day very quickly.
- 3
Hint: Tap the same segment twice and watch the network log.
- 4
Hint: Select Month, open an activity, then go back.
- 5
Hint: Turn on Large text.
- 6
Hint: Turn on Dark mode.
How to test it
Checklist
Segmented control test checklist
0 of 12 checked
Example test cases
TC-SEG-001Default segment is selected on first loadpositivehigh
Preconditions
- App is freshly installed
- User is logged in
Steps
- Open the app
- Navigate to the Activity screen
Expected result
The "Week" segment is selected and the chart title reads "Steps this week".
TC-SEG-002Switching segments updates the contentpositivehigh
Steps
- Open the Activity screen
- Tap "Day"
- Tap "Month"
- Tap "Year"
Expected result
After each tap only the tapped segment is selected, and the chart title and values match it ("Steps today", "Steps this month", "Steps this year").
TC-SEG-003Rapid switching keeps content in sync with selectionedgehigh
Preconditions
- Network throttled to "Slow 3G"
Steps
- Open the Activity screen
- Tap "Year"
- Within 1 second tap "Day"
- Wait 5 seconds
Expected result
"Day" stays selected and the chart shows today's steps. The earlier "Year" response is ignored.
TC-SEG-004Selection persists after navigating away and backpositivemedium
Steps
- Select "Month"
- Tap any activity in the Recent list
- Tap Back
Expected result
"Month" is still selected and monthly data is shown without reloading.
TC-SEG-005Selection persists after device rotationedgemedium
Steps
- Select "Year"
- Rotate the device to landscape
- Rotate back to portrait
Expected result
"Year" remains selected in both orientations and the control resizes correctly.
TC-SEG-006Labels are readable at the largest accessibility text sizeedgemedium
Preconditions
- iOS Settings › Accessibility › Larger Text set to maximum
Steps
- Open the Activity screen
Expected result
All labels are fully readable (not clipped). The control may grow taller or switch layout.
TC-SEG-007VoiceOver announces the selected statepositivemedium
Preconditions
- VoiceOver is on
Steps
- Swipe right until focus reaches the segmented control
- Swipe right across each segment
Expected result
VoiceOver reads e.g. "Week, selected, 2 of 4", then "Month, 3 of 4", for each segment.
TC-SEG-008Re-tapping the selected segment does not reload datanegativelow
Preconditions
- Proxy tool (e.g. Charles) is recording traffic
Steps
- Select "Week" and wait for data
- Tap "Week" again three times
Expected result
No new API requests are sent and no loading indicator appears.
Tip: click a test case to expand it.
Accessibility
A segmented control has to work for people who can’t see the screen, use large text, or navigate with a keyboard. Check these:
- Screen readers (VoiceOver / TalkBackScreen readerSoftware that reads the screen aloud for blind and low-vision users, like VoiceOver or TalkBack.Open in glossary →) must announce each segment’s label, position (“2 of 4”) and whether it’s selected.
Dev note
On the web, that meansrole="radiogroup"withrole="radio"andaria-checkedon each segment, oraria-pressedfor toggle buttons. - Icon-only segments need a text label for assistive tech. Otherwise users just hear “button”.
Dev note
accessibilityLabel/aria-label. - Don’t rely on color alone. The selected segment should differ in more than hue: a thumb, a checkmark or bolder text.
- Contrast: text needs at least 4.5:1 contrast with its background, and the selection indicator at least 3:1.
- Touch targetsTouch targetThe area of the screen that responds to a tap, which should be large enough for a finger.Open in glossary →: at least 44×44 pt on iOS and 48×48 dp on Android. On the web, WCAG 2.5.8 (AA) asks for at least 24×24 CSS px; 44×44 px (2.5.5, AAA) is the comfortable target.
- Keyboard (web): Tab moves focus into the group (onto the selected segment), and arrow keys move between segments. In the radiogroup pattern the arrow keys also select, just like radio buttons; with toggle buttons, each segment is its own Tab stop and Space or Enter selects it.
Mobile vs web
Dev note
UISegmentedControl (UIKit) or Picker with .segmented style (SwiftUI).- Always single selection. The selected segment sits on a sliding thumb; its exact look differs between iOS versions and between light and dark mode.
- Supports Dynamic Type, so test at the largest accessibility sizes.
- Common in navigation bars and toolbars, and under large titles.
- Material 3 calls it a segmented button: an outlined pill with a checkmark on selected items. In the 2025 Material 3 Expressive update it is being replaced by the connected button group, which works the same way with a new look.
- Can be single or multi-select, so read the requirements carefully.
- Material’s guidelines suggest 2–5 segments.
- Test with font scale and display size settings, plus TalkBack.
- Usually custom-built (HTML buttons + CSS) or from a UI library, so quality varies a lot.
- Check keyboard navigation, focus styles and ARIA roles in DevTools.
- Test responsive widths: does it shrink, wrap, or overflow on mobile browsers?
- Test across browsers (Chrome, Safari, Firefox), because CSS differences can break the layout.
Check your understanding
Quick quiz
0/4 answered · 0 correct
1.Which situation is the best fit for a segmented control?
2.You tap "Year" then "Day" quickly. "Day" stays selected but the chart shows yearly data. What is the most likely cause?
3.What should a screen reader announce when focusing a segment?
4.Which test is MOST likely to reveal a truncation bug?
Key takeaways
- A segmented control offers 2–5 short, mutually exclusive options that change content immediately.
- Use something else for actions, long labels, on/off settings, many options or multi-select (except Material’s multi-select variant).
- The classic bugs: no default selection, content out of sync, lost state, truncation, invisible selection, and double requests.
- Always test fast tapping, navigation and rotation, languages and large text, dark mode, and screen readers.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.
Its review cards are now in Bites ⚡