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.

34 lines (33 loc) 1.33 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 `<div>` element. * * Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field) */ declare const NumberFieldScrubArea: React.ForwardRefExoticComponent<NumberFieldScrubArea.Props & React.RefAttributes<HTMLSpanElement>>; declare namespace NumberFieldScrubArea { interface State extends NumberFieldRoot.State { } interface Props extends BaseUIComponentProps<'span', 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 { NumberFieldScrubArea };