UNPKG

react-scribble-pad

Version:
116 lines (79 loc) โ€ข 3.8 kB
# React Scribble Pad ### Transparent Overlay for Sketch, Text, and Stickers. <img width="1435" height="785" alt="image1" src="https://github.com/user-attachments/assets/d94fde81-537e-49c3-a8e6-931e6ca4a8bd" /> <img width="400" height="985" alt="iamge2" src="https://github.com/user-attachments/assets/f6ee340d-6926-42f1-8d58-c37043e0c149" /> <img width="400" height="985" alt="image3" src="https://github.com/user-attachments/assets/d3bb64ee-b970-4260-bc5f-67d8c33ed998" /> ## ๐Ÿ› ๏ธ Installation ``` npm install --save-dev react-scribble-pad yarn add react-scribble-pad ``` **React** ``` import React from 'react'; import { ScribblePad } from "react-scribble-pad"; import "react-scribble-pad/dist/react-scribble-pad.css"; // Must include the css file function App(){ return ( <div> <ScribblePad /> </div> ); } ``` **Next.js (App Router)** ``` "use client"; import { ScribblePad } from "react-scribble-pad"; import "react-scribble-pad/dist/react-scribble-pad.css"; // Must include the CSS file export default function Page() { return ( <div> <ScribblePad /> </div> ); } ``` <br> ## ๐Ÿš€ Features **React Scribble Pad lets you add a fully transparent sketching layer on top of any webpage. Users can freely draw, type notes, place stickers and use as a whiteboard while still seeing and interacting with the content beneath.** - Color Palette โ€“ Choose colors and sketch freely on the canvas. - Eraser Tool โ€“ Remove sketches with ease. - Customization โ€“ Adjust text size and cursor thickness. - Notes โ€“ Add text notes directly on the overlay. - Whiteboard Mode โ€“ Switch to a clean screen and use it as a digital whiteboard. - Motive - perfect for education, presentations, and live annotations. <br> ## ๐ŸŽน Keyboard Shortcuts & Toolpad | Key | Action | | ----- | ---------------------------------------------------------------------------------------------------- | | `๐Ÿ”’` | Enabling screen lock for touch users, prevents scrolling and lets them sketch directly on the canvas | | `1` | ๐ŸŽจ Open the Palette โ€“ choose colors and adjust stroke size | | `2` | ๐Ÿฉน Open the Eraser โ€“ erase parts of your sketch | | `3` | ๐Ÿ–ฑ๏ธ Open Cursor Tools โ€“ change cursor size or appearance | | `4` | ๐Ÿ”„ Reset Everything โ€“ clear the canvas | | `5` | โœ๏ธ Add Texts โ€“ insert text anywhere on the canvas | | `6` | ๐Ÿ“ Make Draggable Notes โ€“ create sticky-style notes you can move around | | `7` | ๐Ÿ–ฅ๏ธ Switch to Whiteboard Mode โ€“ expand into fullscreen whiteboard | | `Esc` | ๐Ÿ”„ Reset Configured Tools | | `Del` | ๐Ÿšฎ Pressing Delete key on draggable notes, will simply delete them | <br> ## ๐Ÿ—ฟ Demo **[A demo is more powerful than storytelling.](https://scribble-pad-psi.vercel.app/)** <br/> ## ๐ŸŽ Donate [<img width="1090" height="306" alt="image" src="https://github.com/user-attachments/assets/ad84946b-d4b9-472f-b4e6-daea70872927" />](https://buymeacoffee.com/aryansmartb) <br/> --- <details> <summary>You know what's absolutely free?</summary> - Leaving a โญ star - ๐ŸดForking the repository - No hidden fees, no subscriptions - just pure open-source love ๐Ÿฅฐ! </details> --- <div align="center"> <br> Powered by โ˜•๏ธ & ๐ŸŽง <br> Aryan Kalra </div>