Skip to content

Slider

A controlled native slider with continuous or stepped values.

#Import

Import Slider from @quickgui/solid/swift-ui.

import { Host, Slider } from "@quickgui/solid/swift-ui";

#Usage

<Host matchContents={{ vertical: true }} style={{ width: 360 }}>
  <Slider
    value={volume()}
    min={0}
    max={1}
    step={0.05}
    label="Volume"
    onValueChange={setVolume}
  />
</Host>

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

Slider(props: SliderProps): NativeNode
testIDstring—

Stable identifier exposed to macOS accessibility and UI testing.

string
View source
modifiersViewModifier[]—

SwiftUI modifiers, applied in array order.

ViewModifier[]
View source
valuenumber—

Controlled slider value.

number
View source
minnumber—

Declares min (optional). Reactive JSX expressions update this property in place.

number
View source
maxnumber—

Declares max (optional). Reactive JSX expressions update this property in place.

number
View source
stepnumber—

Omit for a continuous slider.

number
View source
labelstring—

Declares label (optional). Reactive JSX expressions update this property in place.

string
View source
onValueChange(value: number, event: QuickGuiEvent) => void—

Declares onValueChange (optional). Reactive JSX expressions update this property in place.

(value: number, event: QuickGuiEvent) => void
View source
ref((node: NativeNode) => void) | NativeNode—

Declares ref (optional). Reactive JSX expressions update this property in place.

((node: NativeNode) => void) | NativeNode
View source