Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@commercetools-uikit/text-input
Advanced tools
A controlled text input component for single-line strings with validation states.
import TextInput from '@commercetools-uikit/text-input';
<TextInput value="foo" onChange={(event) => alert(event.target.value)} />;
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
id | string | - | - | - | Used as HTML id property |
name | string | - | - | - | Used as HTML name property |
value | string | ✅ | - | - | Value of the input |
autoComplete | string | - | - | - | Used as HTML autocomplete property |
onChange | func | - | - | - | Called with the new value. Required when input is not read only. Parent should pass it back as value |
onBlur | func | - | - | - | Called when field is blurred |
onFocus | func | - | - | - | Called when field is focused |
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 |
hasError | bool | - | - | - | Indicates the input field has an error |
hasWarning | bool | - | - | - | Indicates the input field has a warning |
placeholder | string | - | - | - | Placeholder text for the input |
horizontalConstraint | object | s , m , l , xl , scale | scale | Horizontal size limit of the input fields. |
The component further forwards all data-
attributes to the underlying input
component.
TextInput.isEmpty
Returns true
when the value is considered empty, which is when the value is empty or consists of spaces only.
TextInput.isEmpty(''); // -> true
TextInput.isEmpty(' '); // -> true
TextInput.isEmpty('tree'); // -> false
FAQs
A controlled text input component for single-line strings with validation states.
The npm package @commercetools-uikit/text-input receives a total of 5,975 weekly downloads. As such, @commercetools-uikit/text-input popularity was classified as popular.
We found that @commercetools-uikit/text-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.