React Hookers - v6.3.0
    Preparing search index...

    Interface HeadlessTrackHandleProps

    Props for the useTrackHandle hook.

    interface HeadlessTrackHandleProps {
        getTrackRect: () => DOMRect | undefined;
        handleMargin?: number;
        isDisabled?: boolean;
        onDrag?: (info: DragInfo) => void;
        onDragChange?: (isDragged: boolean) => void;
        onDragEnd?: (info: DragInfo) => void;
        onDragStart?: (info: DragInfo) => void;
        onPercentageChange?: (percentage: number) => void;
        orientation?: "vertical" | "horizontal";
    }

    Hierarchy (View Summary)

    Index

    Properties

    getTrackRect: () => DOMRect | undefined

    Returns the bounding rect of the track.

    handleMargin?: number

    The minimum distance between the track bounds and the handle bounds along the orientation direction.

    0
    
    isDisabled?: boolean

    If true, drag listeners are disabled.

    false
    
    onDrag?: (info: DragInfo) => void

    A handler that is called while the user is actively dragging the element.

    Type Declaration

      • (info: DragInfo): void
      • Parameters

        • info: DragInfo

          Info about the current drag frame.

        Returns void

    onDragChange?: (isDragged: boolean) => void

    A handler that is called when the drag state changes.

    Type Declaration

      • (isDragged: boolean): void
      • Parameters

        • isDragged: boolean

          true if the element is being dragged.

        Returns void

    onDragEnd?: (info: DragInfo) => void

    A handler that is called when the user stops dragging the element.

    Type Declaration

      • (info: DragInfo): void
      • Parameters

        • info: DragInfo

          Info about the current drag frame.

        Returns void

    onDragStart?: (info: DragInfo) => void

    A handler that is called when the user starts dragging the element.

    Type Declaration

      • (info: DragInfo): void
      • Parameters

        • info: DragInfo

          Info about the current drag frame.

        Returns void

    onPercentageChange?: (percentage: number) => void

    A callback invoked when the handle is dragged along the track.

    Type Declaration

      • (percentage: number): void
      • Parameters

        • percentage: number

          The percentage position along the track.

        Returns void

    orientation?: "vertical" | "horizontal"

    The orientation of the track along which the handle is dragged.

    "horizontal"