Trilium Frontend API
    Preparing search index...

    Interface TouchBarSegmentedControlConstructorOptions

    interface TouchBarSegmentedControlConstructorOptions {
        change?: (selectedIndex: number, isSelected: boolean) => void;
        mode?: "single" | "multiple" | "buttons";
        segments: SegmentedControlSegment[];
        segmentStyle?:
            | "automatic"
            | "rounded"
            | "textured-rounded"
            | "round-rect"
            | "textured-square"
            | "capsule"
            | "small-square"
            | "separated";
        selectedIndex?: number;
    }
    Index

    Properties

    change?: (selectedIndex: number, isSelected: boolean) => void

    Called when the user selects a new segment.

    mode?: "single" | "multiple" | "buttons"

    The selection mode of the control:

    An array of segments to place in this control.

    segmentStyle?:
        | "automatic"
        | "rounded"
        | "textured-rounded"
        | "round-rect"
        | "textured-square"
        | "capsule"
        | "small-square"
        | "separated"

    Style of the segments:

    selectedIndex?: number

    The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.