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.

47 lines (46 loc) 1.61 kB
import * as React from 'react'; import { UseNumberFieldRoot } from './useNumberFieldRoot.js'; import type { BaseUIComponentProps } from '../../utils/types.js'; import type { FieldRoot } from '../../field/root/FieldRoot.js'; /** * Groups all parts of the number field and manages its state. * Renders a `<div>` element. * * Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field) */ declare const NumberFieldRoot: React.ForwardRefExoticComponent<NumberFieldRoot.Props & React.RefAttributes<HTMLDivElement>>; export declare namespace NumberFieldRoot { interface Props extends UseNumberFieldRoot.Parameters, Omit<BaseUIComponentProps<'div', State>, 'onChange' | 'defaultValue'> { } interface State extends FieldRoot.State { /** * The raw numeric value of the field. */ value: number | null; /** * The formatted string value presented in the input element. */ inputValue: string; /** * Whether the user must enter a value before submitting a form. */ required: boolean; /** * Whether the component should ignore user interaction. */ disabled: boolean; /** * Whether the field is currently invalid. */ invalid: boolean; /** * Whether the user should be unable to change the field value. */ readOnly: boolean; /** * Whether the user is currently scrubbing the field. */ scrubbing: boolean; } } export { NumberFieldRoot };