@renderlesskit/react
Version:
Collection of headless components/hooks that are accessible, composable, customizable from low level to build your own UI & Design System powered by Reakit
22 lines (21 loc) • 1.08 kB
TypeScript
import * as React from "react";
import { AriaSliderThumbProps } from "@react-types/slider";
import { SliderBaseStateReturn } from "./SliderBaseState";
export declare type SliderThumbState = {
/** A ref to the thumb input element. */
inputRef: React.RefObject<HTMLInputElement>;
/** Props for the root thumb element; handles the dragging motion. */
thumbProps: React.HTMLAttributes<HTMLElement>;
/** Props for the visually hidden range input element. */
inputProps: React.InputHTMLAttributes<HTMLInputElement>;
/** Props for the label element for this thumb (optional). */
labelProps: React.LabelHTMLAttributes<HTMLLabelElement>;
};
export declare type SliderThumbActions = {};
export declare type SliderThumbStateReturn = SliderThumbState & SliderThumbActions;
export declare type SliderThumbInitialState = AriaSliderThumbProps & {
/** A ref to the track element. */
trackRef: React.RefObject<HTMLElement>;
state: SliderBaseStateReturn;
};
export declare function useSliderThumbState(props: SliderThumbInitialState): SliderThumbStateReturn;