UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

33 lines 1.36 kB
import * as React from 'react'; import type { BaseUIComponentProps } from "../../utils/types.js"; import type { NumberFieldRoot } from "../root/NumberFieldRoot.js"; /** * An interactive area where the user can click and drag to change the field value. * Renders a `<span>` element. * * Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field) */ export declare const NumberFieldScrubArea: React.ForwardRefExoticComponent<NumberFieldScrubAreaProps & React.RefAttributes<HTMLSpanElement>>; export interface NumberFieldScrubAreaState extends NumberFieldRoot.State {} export interface NumberFieldScrubAreaProps extends BaseUIComponentProps<'span', NumberFieldScrubArea.State> { /** * Cursor movement direction in the scrub area. * @default 'horizontal' */ direction?: 'horizontal' | 'vertical'; /** * Determines how many pixels the cursor must move before the value changes. * A higher value will make scrubbing less sensitive. * @default 2 */ pixelSensitivity?: number; /** * If specified, determines the distance that the cursor may move from the center * of the scrub area before it will loop back around. */ teleportDistance?: number | undefined; } export declare namespace NumberFieldScrubArea { type State = NumberFieldScrubAreaState; type Props = NumberFieldScrubAreaProps; }