4.0.5 • Published 8 months ago

@licuido-ui/ui_textarea-autosize v4.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

TextAreaAutoSize

TextAreaAutoSize fields are an essential user interface design element, providing users with the means to enter non-standardized responses

Author

Link

Story Book Link TextAreaAutoSize

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_input-field

Import component

import { TextAreaAutoSize } from '@licuido-ui/ui_input-field';

Usage

<TextAreaAutoSize label={'input'} value={''} />

Image

alt text

Sample Code

<TextAreaAutoSize 
    fullWidth={true}
    variant={'outlined'}
    size={'small'}
    label={''}
    type={'text'}
    id={''}
    value={''}
    rowMax={Infinity}
    rowMin={1}
    isError={''}
    disabled={false}
    fullwidth={false}
    isMulti={false}
    isReadOnly={false}
    helperText={''}
    placeholder={''}
    className={''}
    endAdornment={null}
    defaultValue={null}
    inLineStyles={{}}
    startAdornments={null}
    onChange={undefined}  
  />
PropTypeDescription
inputIdstringThis id is unique.
classNamestringOverride or extend the styles applied.
sxobjectSystem overrides and additional CSS styles.
labelstringTo change label text.
isReadOnlybooleanPrevents the user from changing the value of the field.
variant'outlined''standard''filled'Declare variant types.
valueunknownThe input value. Providing an empty string will select no options.
rowMaxnumberMaximum number of rows to display when multiline option is set to true.
rowsstring | numberNumber of rows to display when multiline option is set to true.
rowMinnumberMinimum number of rows to display when multiline option is set to true.
disabledbooleanIf true, the component is disabled.
fullWidthbooleanIf true, the input will take up the full width of its container.
isMultibooleanIf true, a TextareaAutosize element is rendered.
placeholderstringTo change placeholder text.
fullWidthbooleanIf true, the input will take up the full width of its container.
defaultValueunknownDefault value when the component is not controlled.
inLineStylesobjectSystem overrides and additional CSS styles.
onChangefunctionCallback fired when the value is changed.
inputStyleobjectSystem overrides and additional CSS styles for the input.
multilinebooleanIf true, a textarea element is rendered instead of an input.
requiredbooleanIf true, the label is displayed as required, and the input element is required.
isErrorRequiredbooleanIf true, the label is required in case of an error.
errorMessagestringError message text.
isErrorstringState class applied to the root element if error.
errorbooleanIf true, an error state is displayed.
startAdornmentanyClass applied to the startAdornment Props using a start Icon of the TextField.
endAdornmentanyClass applied to the endAdornment Props using an end Icon of the TextField.
errorVariantanyerror variant applied to the variant Props using an errorVariant of the Typography.

Default Props:

TextAreaAutoSize.defaultProps = {
  label: '',
  variant: 'outlined',
  inputId: 'TextAreaAutoSize',
  value: '',
  rows: 5,
  fullWidth: false,
  multiline: false,
  rowMax: Infinity,
  rowMin: 1,
  disabled: false,
  fullwidth: false,
  isMulti: false,
  isReadOnly: false,
  placeholder: '',
  className: '',
  defaultValue: undefined,
  onChange: undefined,
  required: false,
  errorMessage: '',
  isError: '',
  fontSizeTextArea: '14px',
  textAreaPaddingFilledInput: '24px 16px 16px 16px',
  paddingYAxis: '4px 8px',
  lineHeightTextArea: '20px',
  fontWeightTextArea: 500,
  borderRadiusTextArea: '8px',
  borderTextArea: '1px solid',
  borderColorTextArea: '#E9E9E9',
  backgroundTextArea: '#fff !important',
  lableColor: '#4E585E',
  lableFontSize: '14px',
  lableFontWeight: 400,
  labelLineHeight: '20px',
  errorVariant: 'caption'
};