0.0.6 • Published 12 months ago

@droid-tech/react-ts-textarea v0.0.6

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

textarea

TextArea is a customizable React functional component that renders a textarea input field. It allows for various styling and layout options through its props, making it flexible and easy to use in different UI designs.

Features

  • Customizable Border: Adjust border color, width, and radius.
  • Flexible Dimensions: Control the number of rows and columns.
  • Margin Control: Set top and bottom margins for spacing.
  • Placeholder Text: Define custom placeholder text.
  • Default Values: Pre-configured rows and columns for quick setup.
  • CSS Integration: Supports className and inline styles.
  • Lightweight: Simple, focused functionality.
  • TypeScript Support: Provides type safety and IntelliSense.

Installation

To use the textarea component in your React application, install it via npm:

npm install @droid-tech/react-ts-textarea

Usage

To use the textarea component, import it and provide the required props:

import React from "react";
import { textarea } from "@droid-tech/react-ts-textarea";

<TextArea
  bColor="red"
  bWidth={3}
  bRadius={5}
  rws={12}
  col={100}
  mTop={30}
  mBottom={10}
  pHolder="Type your message here..."
/>;

Props

The textarea component accepts the following props:

PropTypeDefault ValueDescription
bColorstringundefinedThe color of the border.
bWidthnumberundefinedThe width of the border in pixels.
bRadiusnumberundefinedThe border radius for rounded corners in pixels.
rwsnumber8The number of rows (height) for the textarea.
colnumber60The number of columns (width) for the textarea.
mTopnumberundefinedThe top margin in pixels.
mBottomnumberundefinedThe bottom margin in pixels.
pHoldernumberundefinedFont weight of the textarea text
0.0.6

12 months ago