Skip to content

Rotary Selector

Class: FxRotarySelector · Tag: <fx-rotary-selector>

The <fx-rotary-selector> component is a premium, multimeter-style multi-sector rotary selector. It supports distinct groupings (such as voltmeters, resistance scales, and current channels) each containing nested sub-ranges for precise HMI mode selection.


import '@salsafx/ui';

Drag the dial below or click the individual buttons at the bottom to transition between sectors!

<fx-rotary-selector selected-sector="off">
<fx-rotary-selector-sector
id="off"
label="OFF"
color="#ef4444"
text-color="#ef4444"
ranges='[]'
start-deg="165"
end-deg="195"
></fx-rotary-selector-sector>
<fx-rotary-selector-sector
id="acv"
label="VOLTS AC"
color="#3b82f6"
text-color="#60a5fa"
ranges='["600V", "200V", "20V"]'
start-deg="195"
end-deg="265"
></fx-rotary-selector-sector>
</fx-rotary-selector>

PropertyAttributeTypeDefaultDescription
selectedSectorselected-sectorString""ID of the currently selected sector.
selectedRangeselected-rangeString""Currently selected sub-range value.
disableddisabledBooleanfalseDisables the control and prevents user interaction.
sectorsArray[]Array of sector configurations.
PropertyAttributeTypeDefaultDescription
ididString""Unique mode identifier.
labellabelString""Sector group label.
colorcolorString""Sector highlight color.
textColortext-colorString""Sector label text color.
rangesrangesArray[]Array of sub-range values.
startDegstart-degNumber0Starting angle of the sector in degrees.
endDegend-degNumber360Ending angle of the sector in degrees.
NameDetailDescription
change{ sectorId: String, range: String }Emitted when dial snap snaps to a new position.
PropertyDefaultDescription
--fx-size280pxOuter dial diameter bounding size.
--fx-fontmonospaceMonospaced digital font family representation.
--fx-gap20pxBottom padding spaces of values.

classDiagram
    direction TB
    class FxElement
    class FxRotarySelector

    FxElement <|-- FxRotarySelector

See also Architecture.