Skip to main content

Input

import { Input } from '@dr.pogodin/react-utils';

The Input component is a standard text input, based on HTML <input> element, and themed using React Themes library.

Properties

  • labelReact.ReactNode — Input component label (to be rendered next to the input, if provided).

  • testIdstring | undefined — Optional. If provided, it is set as the value of the data-testid attribute of the underlying <input> element, to facilitate its retrieval by Testing Library's getByTestId() methods in test evnironments. It is optimized out from production builds.

  • theme - InputTheme - Ad hoc visual theme.

  • Other props of themed components.

  • Any other props are passed down to the underlying HTML <input> element.

InputTheme

See React Themes docs to learn about component theming. The valid theme keys of Input component are:

  • container - The root component element.
  • input - The underlying HTML <input> element.
  • label — The label element.