A range slider component used to select two numeric values within a range.

Hierarchy

Hierarchy

Constructors

Properties

context: any

If using the new style context, re-declare this in your class to be the React.ContextType of your static contextType. Should be used with type annotation or static contextType.

static contextType = MyContext
// For TS pre-3.7:
context!: React.ContextType<typeof MyContext>
// For TS 3.7 and above:
declare context: React.ContextType<typeof MyContext>
props: Readonly<IIgrRangeSliderProps> & Readonly<{
    children?: ReactNode;
}>
refs: {
    [key: string]: ReactInstance;
}

Type declaration

  • [key: string]: ReactInstance
state: Readonly<{}>
contextType?: Context<any>

If set, this.context will be set at runtime to the current value of the given Context.

Usage:

type MyContext = number
const Ctx = React.createContext<MyContext>(0)

class Foo extends React.Component {
static contextType = Ctx
context!: React.ContextType<typeof Ctx>
render () {
return <>My context's value: {this.context}</>;
}
}

Accessors

  • get ariaLabelLower(): string
  • The aria label of the lower thumb.

    Returns string

  • set ariaLabelLower(v): void
  • Parameters

    • v: string

    Returns void

  • get ariaLabelUpper(): string
  • The aria label of the upper thumb.

    Returns string

  • set ariaLabelUpper(v): void
  • Parameters

    • v: string

    Returns void

  • get change(): ((s, e) => void)
  • Emitted when a value change is committed on a thumb drag end or keyboard interaction.

    Returns ((s, e) => void)

  • set change(ev): void
  • Parameters

    Returns void

  • get disabled(): boolean
  • Disables the UI interactions of the slider.

    Returns boolean

  • set disabled(v): void
  • Parameters

    • v: boolean

    Returns void

  • get discreteTrack(): boolean
  • Marks the slider track as discrete so it displays the steps. If the step is 0, the slider will remain continuos even if discreteTrack is true.

    Returns boolean

  • set discreteTrack(v): void
  • Parameters

    • v: boolean

    Returns void

  • get hidePrimaryLabels(): boolean
  • Hides the primary tick labels.

    Returns boolean

  • set hidePrimaryLabels(v): void
  • Parameters

    • v: boolean

    Returns void

  • get hideSecondaryLabels(): boolean
  • Hides the secondary tick labels.

    Returns boolean

  • set hideSecondaryLabels(v): void
  • Parameters

    • v: boolean

    Returns void

  • get hideTooltip(): boolean
  • Hides the thumb tooltip.

    Returns boolean

  • set hideTooltip(v): void
  • Parameters

    • v: boolean

    Returns void

  • get input(): ((s, e) => void)
  • Emitted when a value is changed via thumb drag or keyboard interaction.

    Returns ((s, e) => void)

  • set input(ev): void
  • Parameters

    Returns void

  • get locale(): string
  • The locale used to format the thumb and tick label values in the slider.

    Returns string

  • set locale(v): void
  • Parameters

    • v: string

    Returns void

  • get lower(): number
  • Returns number

  • set lower(v): void
  • Parameters

    • v: number

    Returns void

  • get lowerBound(): number
  • Returns number

  • set lowerBound(v): void
  • Parameters

    • v: number

    Returns void

  • get max(): number
  • Returns number

  • set max(v): void
  • Parameters

    • v: number

    Returns void

  • get min(): number
  • Returns number

  • set min(v): void
  • Parameters

    • v: number

    Returns void

  • get primaryTicks(): number
  • The number of primary ticks. It defaults to 0 which means no primary ticks are displayed.

    Returns number

  • set primaryTicks(v): void
  • Parameters

    • v: number

    Returns void

  • get secondaryTicks(): number
  • The number of secondary ticks. It defaults to 0 which means no secondary ticks are displayed.

    Returns number

  • set secondaryTicks(v): void
  • Parameters

    • v: number

    Returns void

  • get step(): number
  • Returns number

  • set step(v): void
  • Parameters

    • v: number

    Returns void

  • get tickLabelRotation(): TickLabelRotation
  • The degrees for the rotation of the tick labels. Defaults to 0.

    Returns TickLabelRotation

  • set tickLabelRotation(v): void
  • Parameters

    Returns void

  • get tickOrientation(): SliderBaseTickOrientation
  • Changes the orientation of the ticks.

    Returns SliderBaseTickOrientation

  • set tickOrientation(v): void
  • Parameters

    Returns void

  • get upper(): number
  • Returns number

  • set upper(v): void
  • Parameters

    • v: number

    Returns void

  • get upperBound(): number
  • Returns number

  • set upperBound(v): void
  • Parameters

    • v: number

    Returns void

  • get valueFormat(): string
  • String format used for the thumb and tick label values in the slider.

    Returns string

  • set valueFormat(v): void
  • Parameters

    • v: string

    Returns void

  • get valueFormatOptions(): NumberFormatOptions
  • Number format options used for the thumb and tick label values in the slider.

    Returns NumberFormatOptions

  • set valueFormatOptions(v): void
  • Parameters

    • v: NumberFormatOptions

    Returns void

Methods

  • Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

    Parameters

    • error: Error
    • errorInfo: ErrorInfo

    Returns void

  • Called immediately after updating occurs. Not called for the initial render.

    The snapshot is only present if getSnapshotBeforeUpdate is present and returns non-null.

    Parameters

    Returns void

  • Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as cancelled network requests, or cleaning up any DOM elements created in componentDidMount.

    Returns void

  • Parameters

    • name: string

    Returns any

  • Parameters

    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Runs before React applies the result of render to the document, and returns an object to be given to componentDidUpdate. Useful for saving things such as scroll position before render causes changes to it.

    Note: the presence of getSnapshotBeforeUpdate prevents any of the deprecated lifecycle events from running.

    Parameters

    Returns any

  • Returns DOMElement<{
        children: any[];
        className: string;
        ref: ((ref) => void);
        style: {};
    }, any>

  • Parameters

    • element: any

    Returns void

  • Type parameters

    Type Parameters

    • K extends never

    Parameters

    • state: {} | ((prevState, props) => {} | Pick<{}, K>) | Pick<{}, K>
    • Optional callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • nextProps: any
    • nextState: any

    Returns boolean