0.0.1 • Published 3 years ago

react-floating-label-textarea v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

react-floating-label-textarea

License Downloads minified size minzipped size

npm badge

A floating label component for React. It inherits the font-size from the parent.

react-floating-label-textarea

Try it yourself at the Storybook.

Example

import React from 'react';
import FloatingLabelTextarea from 'react-floating-label-textarea';

export default ({ onChange, value }) =>
  <div style={{ fontSize: 64 }}>
    <FloatingLabelTextarea
      id="example-3"
      label="label"
      onBlur={action('onBlur')}
      onChange={action('onChange')}
      onFocus={action('onFocus')}
      value={value}
    />
  </div>;

Props

nameoptionaldefault
classNameyes
fontSizeyesinherit
idno
labelno
onBluryes
onChangeno
onFocusyes
placeholderyes''
refsyes
typeyestext
valueyes''
  • refs is set as ref prop on textarea

Dependencies

Peer dependencies:

  • react
  • styled-components

License

MIT