Segmented control

A segmented control is a group of two or more segmented control buttons with related content. By applying it, we can immediately switch the view of the linked content.

Color

Design variables

Enabled state

#505057
Secondary
Secondary color for text layers or icons on top of Layer
Syntax: Web
var(--color-on-layer-secondary)
Collection
UI colors
rgba(255,255,255,0)
Invisible
Tertiary button background color
Syntax: Web
var(--color-button-invisible)
Collection
UI colors
#f3f3f5
Level 2
Container background color on layer 1
Syntax: Web
var(--color-layer-level-2)
Collection
UI colors
rgba(0,0,0,0.2)
Primary
Border color on background and surface for lines and borders
Syntax: Web
var(--color-border-primary)
Collection
UI colors

Hover, active state

#24242b
Primary
Primary color for text layers or icons on top of Layer
Syntax: Web
var(--color-on-layer-primary)
Collection
UI colors
rgba(0,0,0,0.05)
Invisible hover
Hover background color for button Invisible
Syntax: Web
var(--color-button-invisible-hover)
Collection
UI colors
rgba(0,0,0,0.1)
Invisible active
Active background color for button Invisible
Syntax: Web
var(--color-button-invisible-active)
Collection
UI colors
#f3f3f5
Level 2
Container background color on layer 1
Syntax: Web
var(--color-layer-level-2)
Collection
UI colors
rgba(0,0,0,0.2)
Primary
Border color on background and surface for lines and borders
Syntax: Web
var(--color-border-primary)
Collection
UI colors

isSelected state

#003beb
Interactive
Color represents interactive elements on top of Layer
Syntax: Web
var(--color-on-layer-interactive)
Collection
UI colors
#ffffff
Level 1
Default container background color on layer 0
Syntax: Web
var(--color-layer-level-1)
Collection
UI colors
rgba(0,0,0,0.2)
Primary
Border color on background and surface for lines and borders
Syntax: Web
var(--color-border-primary)
Collection
UI colors

States

States are visual representations used to communicate the status of a segmented control button as an interactive element.

Segmented control - States
  1. Enabled – The enabled state of a segmented control button is when the user's cursor is not hovering over it, and the segmented control button isn’t disabled.
  2. Hover – When the user's cursor is on the segmented control button, it is in a hover state, but has not been clicked yet.
  3. Active – Segmented control button is in a active state after it has been pressed.
  4. Focus – Segmented control button is in a focus state when it is targeted via keyboard navigation.
  5. isSelected – Segmented control button is in the selected state to indicate a completed action.
  6. Loading – When an action is running, segmented control button is in a loading state. All the segmented control button support this state, and the width does not need to be changed. The cursor will show as ‘in progress’ to indicate that the action is being completed.
  7. Disabled – Segmented control button is in a disabled state when its action is blocked by something that needs to be completed first, such as changing a field value or waiting for a system response. Its opacity is set to 50%. Add an explanatory tooltip to inform the user why the button is disabled. The cursor will show as ‘not-allowed’ to indicate that the action cannot be executed.

Typography

Segmented control text is written in sentence case. Only the first word of each segmented control button is capitalized unless it includes a proper name or a word we capitalize (see Terminology and vocabulary).

 

Font-size (px)

Font-weight

Button label

13

Semi-Bold

Size

Segment control is available in two sizes. The size should be chosen based on the space available. By default, Soul defines Medium.

Segmented control - Sizes

Dimensions

Segment control is available in two sizes in height: small (30 px) and medium (36 px). The width is flexible and can be adjusted based on content, layout, and design requirements.

Small

Small

Medium

Medium