/** @packageDocumentation * @module Slider */ import "./Slider.scss"; import * as React from "react"; import { SliderModeFunction } from "react-compound-slider"; import { CommonProps } from "../utils/Props"; /** Properties for [[Slider]] component * @public */ export interface SliderProps extends CommonProps { /** Values to set Slider to initially */ values: number[]; /** Minimum value */ min: number; /** Maximum value */ max: number; /** Format the min display value */ formatMin?: (value: number) => string; /** Format the max display value */ formatMax?: (value: number) => string; /** Step value. Default is 0.1. */ step?: number; /** The interaction mode. Default is 1. Possible values: * 1 - allows handles to cross each other. * 2 - keeps the sliders from crossing and separated by a step. * 3 - makes the handles pushable and keep them a step apart. * function - SliderModeFunction that will be passed the current values and the incoming update. * Your function should return what the mode should be set as. */ mode?: number | SliderModeFunction; /** Indicates whether the display of the Slider values is reversed. */ reversed?: boolean; /** Indicates whether the Slider is disabled. */ disabled?: boolean; /** Indicates whether to compensate for the tick marks when determining the width. */ includeTicksInWidth?: boolean; /** Indicates whether to show tooltip with the value. The tooltip will be positioned above the Slider, by default. */ showTooltip?: boolean; /** Indicates whether the tooltip should show below the Slider instead of above. */ tooltipBelow?: boolean; /** Format a value for the tooltip */ formatTooltip?: (value: number) => string; /** Indicates whether to show min & max values to the left & right of the Slider. */ showMinMax?: boolean; /** Image to show for min. */ minImage?: React.ReactNode; /** Image to show for max. */ maxImage?: React.ReactNode; /** Indicates whether to show tick marks under the Slider. */ showTicks?: boolean; /** Indicates whether to show tick labels under the tick marks. */ showTickLabels?: boolean; /** Format a tick mark value */ formatTick?: (tick: number) => string; /** Function to get the tick count. The default tick count is 10. */ getTickCount?: () => number; /** Function to get the tick values. This overrides the tick count from getTickCount. * Use this prop if you want to specify your own tick values instead of ticks generated by the slider. * The numbers should be valid numbers in the domain and correspond to the step value. * Invalid values will be coerced to the closet matching value in the domain. */ getTickValues?: () => number[]; /** Listens for value changes. * Triggered when the value of the slider has changed. This will receive changes at * the end of a slide as well as changes from clicks on rails and tracks. */ onChange?: (values: ReadonlyArray) => void; /** Listens for value updates. * Called with the values at each update (caution: high-volume updates when dragging). */ onUpdate?: (values: ReadonlyArray) => void; /** Function triggered with ontouchstart or onmousedown on a handle. */ onSlideStart?: (values: ReadonlyArray) => void; /** Function triggered on ontouchend or onmouseup on a handle. */ onSlideEnd?: (values: ReadonlyArray) => void; } /** * Slider React component displays a range slider. * The Slider component uses various components from the * [react-compound-slider](https://www.npmjs.com/package/react-compound-slider) * package internally. * @public */ export declare function Slider(props: SliderProps): JSX.Element; //# sourceMappingURL=Slider.d.ts.map