DocSpace-client/packages/components/text-input
2023-11-13 22:24:33 +01:00
..
common-input-styles.js Fix Bug 65090 - Files.RTL. Fix when arabic text places in left side of input type search 2023-11-13 22:24:33 +01:00
index.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
input.js Web: Components: Adapt TextInput component to RTL interface 2023-06-07 17:33:06 +02:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-text-input.js Components: fixed user agent styles with disabled status 2023-11-13 17:38:57 +05:00
text-input.js Merge branch 'release/v2.0.0' into feature/new-form-gallery 2023-10-20 11:09:31 +03:00
text-input.stories.js figma links were added 2023-07-03 13:31:26 +05:00
text-input.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00

TextInput

Input field for single-line strings

Usage

import TextInput from "@docspace/components/text-input";
const mask = [/\d/, /\d/, "/", /\d/, /\d/, "/", /\d/, /\d/, /\d/, /\d/];
<TextInput
  mask={mask}
  value="text"
  onChange={(event) => alert(event.target.value)}
/>

Properties

Props Type Required Values Default Description
autoComplete string - - - Used as HTML autocomplete property
className string - - - Accepts class
hasError bool - - - Indicates the input field has an error
hasWarning bool - - - Indicates the input field has a warning
id string - - - Used as HTML id property
isAutoFocussed bool - - - Focus the input field on initial render
isDisabled bool - - false Indicates that the field cannot be used (e.g not authorised, or changes not saved)
isReadOnly bool - - false Indicates that the field is displaying read-only content
mask array - - - input text mask
name string - - - Used as HTML name property
onBlur func - - - Called when field is blurred
onChange func - - - Called with the new value. Required when input is not read only. Parent should pass it back as value
onFocus func - - - Called when field is focused
placeholder string - - - Placeholder text for the input
scale bool - - - Indicates the input field has scale
size string base, middle, big, huge, large base Supported size of the input fields.
style obj, array - - - Accepts css style
type string text, password text Supported type of the input fields.
value string - - Value of the input
withBorder bool - - true Indicates that component contain border
fontWeight number, string - - - Sets the font weight
isBold bool - - false Sets font weight value to 600