Skip to content

ElectronTouchBarSegmentedControlConstructorOptions

Unofficial

Options for creating a ElectronTouchBarSegmentedControl.

Import:

import type { ElectronTouchBarSegmentedControlConstructorOptions } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface ElectronTouchBarSegmentedControlConstructorOptions

Properties

PropertyTypeDescription
mode?'buttons' | 'multiple' | 'single'The selection mode of the control.
segmentsElectronSegmentedControlSegment[]An array of segments to place in this control.
segmentStyle?'automatic' | 'capsule' | 'round-rect' | 'rounded' | 'separated' | 'small-square' | 'textured-rounded' | 'textured-square'Style of the segments.
selectedIndex?numberThe index of the currently selected segment, updated automatically with user interaction. When the mode is multiple it will be the last selected item.

Methods

MethodReturnsDescription
change(selectedIndex, isSelected)voidCallback invoked when the user selects a new segment.