Segmented ControlNew

Segmented control is used to pick one choice from a set of closely related choices, and immediately apply that selection.

Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
Edit in CodePen
Open in new window
View RTL
<nord-visually-hidden id="label">Time frame</nord-visually-hidden>
<nord-segmented-control aria-labelledby="label">
  <nord-segmented-control-item size="s" label="Day" name="group" value="day" checked></nord-segmented-control-item>
  <nord-segmented-control-item size="s" label="Week" name="group" value="week"></nord-segmented-control-item>
  <nord-segmented-control-item size="s" label="Month" name="group" value="month"></nord-segmented-control-item>
</nord-segmented-control>

Properties

PropertyAttributeDescriptionTypeDefault
expandexpand

Controls whether the segmented control expands to fill the width of its container.

booleanfalse

Events

EventDescriptionType
change

Fired whenever a segmented control item has been checked.

NordEvent

Slots

Slot nameDescription
Default slot

Default slot.

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use segmented control to allow users to pick one choice from a set of closely related choices, and immediately apply that selection.
  • Favor segmented control or radio component over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.
  • Segmented control items are grouped by their name attribute. Therefore, it is crucial that the same name is used for a group of segmented control items.
  • Give each segmented control item within a group a unique value.

Don’t

  • Don’t place interactive content (buttons, links etc) inside the label.
  • Don’t use when a user can select more than one option. In this case, use a checkbox or selectable tag instead.
  • Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.
  • When you have more than 5 options to choose from. Consider using a select instead.

Content guidelines

Segmented control labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:

User settings
Option 1

When writing segmented control labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):

My tasks
My Tasks

Avoid ending in punctuation if it’s a single sentence, word, or a fragment:

Blue
Blue.

Do not use commas or semicolons at the end of each line

Patient
Patient;

Additional considerations

  • Once a segmented control item has been selected, users cannot return to having no items selected without refreshing their browser window. Therefore, you should always make sure one of the items is pre-selected.

Integration

For integration guidelines, please see Web Components documentation. This documentation explains how to implement and use Nord Web Components across different technologies such as Vue.js, React, or Vanilla JavaScript.

Integration Guidelines

Troubleshooting

If you experience any issues while using Nord Web Components, please head over to the Support page for more guidelines and ways to contact us.


Was this page helpful?

YesNo
Send feedback

We use this feedback to improve our documentation.