Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@s-ui/react-molecule-input-field

SUI-Components23.2kMIT4.8.0

MoleculeInputField is a component that wraps a composition of Label + Textarea + Validation Messages.

@s-ui, react, component, molecule, inputField

readme

MoleculeInputField

MoleculeInputField is a component that wraps a composition of Label + Textarea + Validation Messages.

documentation issue npm

Issues open NPM

Installation

$ npm install @s-ui/react-molecule-input-field --save

Usage

After importing the component MoleculeInputField like this

import MoleculeInputField from '@s-ui/react-molecule-input-field'

Basic usage

  <MoleculeInputField
    id="second"
    placeholder="Medium Input"
    leftAddon="http://"
    rightAddon="@schibsted.com"
    label="Description"
    value="In some place of La Mancha which name..."
  />

With successText

  <MoleculeInputField
    id="description2"
    label="Description"
    value="In some place of La Mancha which name..."
    successText="Everything ok!"
  />

With errorText

  <MoleculeInputField
    id="notes"
    label="Notes"
    errorText="All wrong!"
  />

With alertText

  <MoleculeInputField
    id="notes"
    label="Notes"
    alertText="All wrong!"
  />

With helpText

  <MoleculeInputField
    id="description-inline2"
    label="Description"
    helpText="Tu descripción en Latin"
    value="Lorem ipsum dolor sit amet"
  />

Inline

  <MoleculeInputField
    id="description"
    label="Description"
    value="In some place of La Mancha which name..."
    inline
  />

Find full description and more examples in the demo page.