UNPKG

@react-md/form

Version:

This package is for creating all the different form input types.

44 lines (43 loc) 1.74 kB
import type { HTMLAttributes } from "react"; import type { PropsWithRef } from "@react-md/utils"; import type { BaseSliderProps } from "./types"; import type { SliderRequiredProps } from "./useSlider"; /** * @remarks \@since 2.5.0 */ export interface SliderProps extends SliderRequiredProps, BaseSliderProps { /** * An optional label to apply to the slider's thumb. This should normally be a * short (1-4 word) description for this slider. * * @see {@link SliderLabelProps.label} * @see {@link thumbLabelledBy} */ thumbLabel?: string; /** * An optional id point to a label describing the slider's thumb. This should * normally be a short (1-4 word) description for this slider. * * @see {@link SliderLabelProps.label} * @see {@link thumbLabel} */ thumbLabelledBy?: string; /** * Any additional props you'd like to pass to the track element as well as an * optional `ref` if you need access to the track element for some reason. */ trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>; /** * Any additional props you'd like to pass to the thumb element as well as an * optional `ref` if you need access to the track element for some reason. */ thumbProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>; } /** * The `Slider` component allows the user to select a single value from a range * of numbers. The functionality for controlling the value of this component is * provided by the `useSlider` hook. * * @remarks \@since 2.5.0 */ export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLDivElement>>;