Skip to content

mui-copy-field 2.0.0

Install from the command line:
Learn more about npm packages
$ npm install @eisberg-labs/mui-copy-field@2.0.0
Install via package.json:
"@eisberg-labs/mui-copy-field": "2.0.0"

About this version

Downloads

Material UI TextField with copy to clipboard functionality.

Example

If you 👍 or use this project, consider giving it a ★, thanks! 🙌

Installation

Since this is an extension of mui components, prerequisite is to have material library already installed.

npm i --save @mui/material @emotion/react @emotion/styled @mui/icons-material

As for the mui-copy-field:

npm i --save @eisberg-labs/mui-copy-field

Usage

Take a look at Storybook examples for example usage. You can use it like TextField:

import {DefaultCopyField} from '@eisberg-labs/mui-copy-field';

<DefaultCopyField
  label="Click on copy Button"
  value={"Enter text"} />

or like TextField with extra props:

import {CopyField} from '@eisberg-labs/mui-copy-field';

<CopyField
  label="Click on copy Button"
  value={"Enter text"}
  onCopySuccess={console.log}
  onCopyError={console.log}
  copyTooltip={"Some copy tooltip. Default is Copy"}
/>
Name Type Default Description
copyTooltip string "Copy" Copy button tooltip
onCopySuccess Function undefined If defined, fired on copy to clipboard
onCopyError Function undefined If defined, fired on copy to clipboard error

Demo

Try the Demo

License

MIT © Eisberg Labs

Details


Assets

  • mui-copy-field-2.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0