Package Exports
- @gdo-bzh/textarea-autosize
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gdo-bzh/textarea-autosize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
textarea-autosize
A textarea component which automatically adjust its height on keyboard and window resize events
Install
yarn add @gdo-bzh/textarea-autosize react
Usage
import React from 'react'
const Example: React.FC = () => (<TextareaAutosize autofocus autoselect placeholder="type text" />)
Types
type Props = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'rows'> & State
type State = {
/**
* true to autoselect text content at initialize
*/
autoselect?: boolean;
/**
* the value of an <textarea> element
*/
value?: React.TextareaHTMLAttributes<HTMLTextAreaElement>['value'];
/**
* Minimum number of rows to display. Default value is 1
*/
minRows?: number;
/**
* Maximum number of rows to display.
*/
maxRows?: number;
}
License
MIT © gdo-bzh