Input

A text input component UI is a widely used element in web and mobile applications for capturing short, single-line text input from users. It is typically used for things like collecting names, emails, search queries, or any other type of single-line text data.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab
Label
Helper text

Usage

import { Input } from 'bio-bind-ui';
<Input
  endAddon=''
  endIcon=''
  errorText='Error text'
  helperText='Helper text'
  id=''
  label='Label'
  maxLength={255}
  mode='light'
  name='input'
  onChange={() => {}}
  placeholder='Placeholder'
  radius='none'
  size='sm'
  startAddon=''
  startIcon=''
  style={{}}
  type='text'
  value=''
  variant='border'
/>

Examples

AddOns

Add-ons can be used to provide extra information, tools, or actions associated with the input component.

Label
https://
.com
Helper text

Variant

Use variant for change the variant of input component: border, background and line

Label
Helper text

Label
Helper text

Label
Helper text

IsError

Whether the input is in error state or not

Label
Error text

Size (Optional)

Use size for change the size of input component: sm, md and lg

Label
Helper text

Label
Helper text

Label
Helper text

Props

PropsRequiredDefaultTypeDescription
variantfalseborderborder background lineSpecifies the variant of the input (e.g., border, background, or line).
typefalsetext"text number passwordThe type of the input (e.g., text, number, or password).
sizefalsemdsm md lgThe size of the input component (e.g., small, medium, or large).
onChangetrue-(event: React.ChangeEvent<HTMLInputElement>) => voidThe event handler for the input’s change event.
valuetrue-stringThe value of the input field.
placeholdertrue-stringThe placeholder text for the input field.
showCountfalsefalsebooleanA flag indicating whether to show the character count in the input field.
maxLengthfalse100numberThe maximum number of characters allowed in the input field.
helperTextfalse-stringThe helper text that appears under the input field to provide extra guidance to the user.
isErrorfalsefalsebooleanA flag indicating whether the input is in an error state (e.g., showing an error message).
errorTextfalse-stringThe error text displayed when the input has an error.
radiusfalsemdnone xs sm md lg xl fullThe border radius of the input (e.g., none, small, medium, large, etc.).
startIconfalse-React.ReactNodeThe icon to display at the start of the input (e.g., a search icon).
endIconfalse-React.ReactNodeThe icon to display at the end of the input (e.g., a clear or password visibility icon).
startAddonfalse-React.ReactNodeThe addon to display at the start of the input (e.g., a currency symbol).
endAddonfalse-React.ReactNodeThe addon to display at the end of the input (e.g., a unit or percentage sign).
labelfalse-stringThe label text for the input field.
disabledfalsefalsebooleanA flag indicating whether the input is disabled and cannot be interacted with.
requiredfalsefalsebooleanA flag indicating whether the input is required in a form.
stylefalse-React.CSSPropertiesThe custom styles for the input component.
modefalselightdark lightSpecifies the mode of the input (e.g., dark or light).
idfalse-stringThe unique identifier for the input element.
namefalse-stringThe name attribute of the input element, often used in form submissions.
BIND © Biofarma Innovate Next-level Design .