react-share-modal
npm install react-share-modal
You can share the current url on various social media by opening the Share modal
npm install react-share-modal
# or
yarn add react-share-modal
---
Information about the example code, prop type, and style for the package modal.
#### basic

#### children & lang = 'ko'

``jsx
import { ShareModal } from "react-share-modal";
export default function App() {
const [isOpen, setIsOpen] = useState < boolean > false;
return (
<>
onCancel={() => setIsOpen(false)}
theme="light"
lang="ko"
>
// children
>
);
}
``
---
* Telegram
* Line
* What's App
* Clipboard
---
| props | type | description |
| ------------ | --------------- | ----------------------------------------------- |
| view | bool | Use isOpen state to open the modal |
| onCancel | () => void | Use this function to close the modal |
| theme | string | default: 'light' / 'dark' |
| lang | string | default: 'en' / 'ko' |
| children | React.ReactNode | You can add a sharing function through chlidren |
---
| name | size |
| -------- | ----------------------- |
| icon | 50px // max-width: 48px |
| span | 12px |