@crave/farmblocks-input-text

    5.1.12 • Public • Published

    Farmblocks Text Input

    A form field to input simple text

    Installation

    npm install @crave/farmblocks-input-text
    

    Usage

    import React, { Component } from "react";
    import { render } from "react-dom";
    import TextInput, { TextAreaInput } from "@crave/farmblocks-input-text";
    
    const root = document.createElement("div");
    document.body.appendChild(root);
    
    render(
      <div>
        <TextInput label="Text Field" placeholder="enter a text..." />
        <TextInput disabled label="Disabled Field" placeholder="disabled field" />
        <TextInput
          label="Number Field"
          type="number"
          placeholder="enter a number"
        />
        <TextAreaInput label="Text area input" rows="4" />
      </div>,
      root,
    );

    This component uses the html input element. So the APIs are very similar.

    For example, value, placeholder, disabled, maxLength, onChange and others not listed here, should work as expected, you can assume that the property will be forwarded to the core html input element. Ref.: MDN <input>

    For more examples and details on the available props, read the docs.

    License

    MIT

    Install

    npm i @crave/farmblocks-input-text

    DownloadsWeekly Downloads

    1,251

    Version

    5.1.12

    License

    MIT

    Unpacked Size

    54.7 kB

    Total Files

    10

    Last publish

    Collaborators

    • seocam
    • vnakamura
    • alcferreira
    • imwra
    • juliansotuyo