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.

    Deprecated

    Use the thumbLabelLower property instead.

    Returns string

  • set ariaLabelLower(v): void
  • Parameters

    • v: string

    Returns void

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

    Deprecated

    Use the thumbLabelUpper property instead.

    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
  • The current value of the lower thumb.

    Returns number

  • set lower(v): void
  • Parameters

    • v: number

    Returns void

  • get lowerBound(): number
  • The lower bound of the slider value. If not set, the min value is applied.

    Returns number

  • set lowerBound(v): void
  • Parameters

    • v: number

    Returns void

  • get max(): number
  • The maximum value of the slider scale. Defaults to 100. If max is less than min the call is a no-op. If labels are provided (projected), then max is always set to the number of labels. If upperBound ends up being greater than than the current max value, it is automatically assigned the new max value.

    Returns number

  • set max(v): void
  • Parameters

    • v: number

    Returns void

  • get min(): number
  • The minimum value of the slider scale. Defaults to 0. If min is greater than max the call is a no-op. If labels are provided (projected), then min is always set to 0. If lowerBound ends up being less than than the current min value, it is automatically assigned the new min value.

    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
  • Specifies the granularity that the value must adhere to. If set to 0 no stepping is implied and any value in the range is allowed. If labels are provided (projected) then the step is always assumed to be 1 since it is a discrete slider.

    Returns number

  • set step(v): void
  • Parameters

    • v: number

    Returns void

  • get thumbLabelLower(): string
  • The aria label for the lower thumb.

    Returns string

  • set thumbLabelLower(v): void
  • Parameters

    • v: string

    Returns void

  • get thumbLabelUpper(): string
  • The aria label for the upper thumb.

    Returns string

  • set thumbLabelUpper(v): void
  • Parameters

    • v: string

    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
  • The current value of the upper thumb.

    Returns number

  • set upper(v): void
  • Parameters

    • v: number

    Returns void

  • get upperBound(): number
  • The upper bound of the slider value. If not set, the max value is applied.

    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<any, Element>

  • 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