Skip to content

Segmented Picker

A control allowing users to select one option from a linear set, often used for view switching.

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusSegmented Picker } from '@plusui/react';
import { PlusSegmented PickerComponent } from '@plusui/angular';
import { PlusSegmented Picker } from '@plusui/vue';
import PlusSegmented Picker from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Segmented picker Changelog

Recent changes and updates for the segmented picker component

📝

No entries found

No changelog entries found for segmented picker component.

The Segmented Picker (plus-segmented-picker) presents a set of related options (plus-segmented-picker-item) in a compact, linear format, allowing users to select only one option at a time. It’s commonly used for toggling between different views or modes.

Segmented Picker - anatomy

A simple segmented picker with three options.

List

Grid

Map

Show code

Set the size prop on the plus-segmented-picker to control the size of all items.

Sm ASm BMd AMd BLg ALg B
Show code

The shape prop on plus-segmented-picker controls the rounding of the container and the selection overlay.

Square ASquare BCircle ACircle B
Show code

The status prop changes the color scheme, typically used to highlight the picker or match a theme.

Default ADefault BPrimary APrimary B
Show code

Set the disabled attribute on individual plus-segmented-picker-item components to prevent their selection.

Enabled ADisabled BEnabled C
Show code

Listen to selection changes for dynamic behavior.

Option 1Option 2Option 3
Show code
Show console
Segmented Picker - layout spacing Segmented Picker - light & dark mode
  • Keyboard Behavior:
    • The segmented picker container (plus-segmented-picker) is part of the tab order.
    • When the container has focus, ArrowLeft / ArrowRight navigate between items, updating the selection and moving focus accordingly. Navigation wraps around.
    • Home selects the first non-disabled item.
    • End selects the last non-disabled item.
    • Enter or Space typically aren’t needed as selection follows focus, but could be implemented for activation if needed.
  • Screen Reader:
    • The plus-segmented-picker container uses role="radiogroup".
    • Each plus-segmented-picker-item uses role="radio" with aria-checked reflecting its selection state.
    • Labels for each item are derived from their slotted content.
    • Disabled items have aria-disabled="true".
  • Required Developer Actions:
    • Provide an accessible label for the plus-segmented-picker container itself, typically using aria-label or aria-labelledby.
    • Ensure each plus-segmented-picker-item has meaningful content (text or icons with accessible labels) in its default slot.
    • Assign a unique and descriptive value to each plus-segmented-picker-item.
NameTypeDefaultDescriptionRequired
status'default' | 'primary''default'Color scheme of the picker. Passed to items.No
shape'square' | 'circle''square'Overall shape (rounding) of the picker. Passed to items.No
size'sm' | 'md' | 'lg''md'Size of the picker and its items. Passed to items.No
NamePayload TypeDescription
plus-segmented-picker-item-changedCustomEvent<{value: string}>Fired when the selected item changes.
NameDescription
(default)Contains the plus-segmented-picker-item elements for the picker.
NameDescription
hostThe main host container element.
animation-overlayThe overlay element used for selection animation.

NameTypeDefaultDescriptionRequired
checkedbooleanfalseWhether the item is currently selected.No
status'default' | 'primary''default'Color scheme (inherited from parent picker).No
disabledbooleanfalseDisables the item, preventing selection.No
shape'square' | 'circle''square'Shape (rounding) (inherited from parent picker).No
size'sm' | 'md' | 'lg''md'Size (inherited from parent picker).No
groupNamestring''Internal property to group items (set by parent picker).No
valuestring''The value associated with this item.Yes

This component primarily communicates selection changes through the parent plus-segmented-picker’s plus-segmented-picker-item-changed event.

NameDescription
(default)The content displayed inside the item (text, icon, etc.).
NameDescription
labelThe label element wrapping the slot content.
inputThe hidden radio input element.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.