Plugins

Covers Engine Plugin SDK 2.0.0 · Interface Plugin SDK 0.2.0

Slider

Slider using the host's numeric ranges presentation.

Import

import { Slider } from "@dartwic/interface-sdk/ui";

Declaration

export const Slider: HostComponent<SliderProps>;

SliderProps

Numeric range control; values are arrays even for a single thumb.

export interface SliderProps extends HostComponentProps {
    value?: number[];
    defaultValue?: number[];
    onValueChange?: (value: number[]) => void;
    onValueCommit?: (value: number[]) => void;
    min?: number;
    max?: number;
    step?: number;
    disabled?: boolean;
}
PropTypeRequirementDescription
valuenumber[]Optional
defaultValuenumber[]Optional
onValueChange(value: number[]) => voidOptional
onValueCommit(value: number[]) => voidOptional
minnumberOptional
maxnumberOptional
stepnumberOptional
disabledbooleanOptional
classNamestringOptionalAdditional Tailwind or host CSS classes.
childrenHostNodeOptionalChild content rendered by the host component.
idstringOptionalOptional DOM identifier.
styleRecord<string, unknown>OptionalInline style values passed to the host component.