1.1.1 • Published 6 months ago
copykit-react v1.1.1
Copykit
Copykit is a React component that utilises Material-UI styling to easily generate highly customisable "copy to clipboard" components.
Installation
To start using Copykit components, you must install it first in your project.
npm install copykit-react
Usage
There are 3 components that you can choose from.
1. <IconCopy />
-
<TextCopy />
-
<TextIconCopy />
import { useState } from 'react';
import { IconCopy } from 'copykit-react';
import { TextField } from '@mui/material'
function App() {
const [text, setText] = useState('')
return (
<>
<TextField value={text} onChange={(e) => setText(e.target.value)}/>
<IconCopy text={text} />
</>
);
}
export default App;
Documentation
Find the full API documentation and examples here