@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.
26 lines • 1.15 kB
TypeScript
import * as React from 'react';
import type { BaseUIComponentProps } from "../utils/types.js";
import { Field } from "../field/index.js";
/**
* A native input element that automatically works with [Field](https://base-ui.com/react/components/field).
* Renders an `<input>` element.
*
* Documentation: [Base UI Input](https://base-ui.com/react/components/input)
*/
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
export interface InputProps extends BaseUIComponentProps<'input', Input.State> {
/**
* Callback fired when the `value` changes. Use when controlled.
*/
onValueChange?: Field.Control.Props['onValueChange'];
defaultValue?: Field.Control.Props['defaultValue'];
}
export interface InputState extends Field.Control.State {}
export type InputChangeEventReason = Field.Control.ChangeEventReason;
export type InputChangeEventDetails = Field.Control.ChangeEventDetails;
export declare namespace Input {
type Props = InputProps;
type State = InputState;
type ChangeEventReason = InputChangeEventReason;
type ChangeEventDetails = InputChangeEventDetails;
}