npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-dev-notepad

v1.1.3

Published

A floating, draggable, resizable notepad component for Vue.js developers with per-page note persistence

Downloads

32

Readme

Vue Dev Notepad

A floating, draggable, and resizable notepad component designed specifically for Vue.js developers with per-page note persistence.

✨ Features

  • 🖱️ Draggable - Click and drag to move around the screen
  • 📏 Resizable - Resize to your preferred dimensions
  • 💾 Auto-save - Every keystroke is automatically saved
  • 📄 Per-page notes - Each route/page has its own separate notepad
  • 🔄 Persistent - Notes persist across browser sessions
  • 🎨 Clean design - Minimalistic and modern appearance
  • ⬇️ Minimize/Maximize - Collapse when not needed
  • Show/Hide - Close and reopen as needed
  • 🎯 Position memory - Remembers position and size per page

📦 Installation

npm install vue-dev-notepad

🚀 Usage

As a Plugin (Recommended)

// main.js
import { createApp } from 'vue'
import VueDevNotepad from 'vue-dev-notepad'
import 'vue-dev-notepad/dist/style.css' // Import styles
import App from './App.vue'

const app = createApp(App)
app.use(VueDevNotepad)
app.mount('#app')

Then use in any component:

<template>
  <div>
    <DevNotepad />
  </div>
</template>

As a Component

<template>
  <div>
    <DevNotepad
      :default-position="{ x: 50, y: 50 }"
      :default-size="{ width: 350, height: 300 }"
    />
  </div>
</template>

<script setup>
import { DevNotepad } from 'vue-dev-notepad'
import 'vue-dev-notepad/dist/style.css' // Import styles
</script>

⚙️ Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | defaultPosition | Object | { x: 100, y: 100 } | Initial position when first loaded | | defaultSize | Object | { width: 300, height: 250 } | Initial size when first loaded | | minWidth | Number | 200 | Minimum width constraint | | minHeight | Number | 150 | Minimum height constraint | | maxWidth | Number | 600 | Maximum width constraint | | maxHeight | Number | 500 | Maximum height constraint | | storagePrefix | String | 'dev-notepad' | localStorage key prefix | | devOnly | Boolean | true | Only show in development environment |

🚀 Production vs Development

By default, the notepad only appears in development and is automatically hidden in production builds. This prevents your notes from showing to end users.

Default Behavior (Recommended)

<template>
  <!-- Only visible during development -->
  <DevNotepad />
</template>

Show in Production (if needed)

<template>
  <!-- Visible in both development and production -->
  <DevNotepad :dev-only="false" />
</template>

Environment Detection

The component uses process.env.NODE_ENV === 'development' to determine when to show the notepad.

🎮 Methods

Access these methods using template refs:

<template>
  <div>
    <DevNotepad ref="notepadRef" />
    <button @click="clearNotes">Clear Notes</button>
    <button @click="toggleNotepad">Toggle</button>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { DevNotepad } from 'vue-dev-notepad'

const notepadRef = ref(null)

const clearNotes = () => {
  notepadRef.value.clearNote()
}

const toggleNotepad = () => {
  notepadRef.value.toggleNotepad()
}
</script>

Available methods:

  • openNotepad() - Show the full notepad
  • closeNotepad() - Collapse to button
  • toggleNotepad() - Toggle between full/collapsed
  • toggleMinimize() - Toggle minimize state (when open)
  • clearNote() - Clear the current note content

💡 How it Works

The notepad automatically detects the current route and stores notes separately for each page. Notes are saved to localStorage with a key pattern:

dev-notepad-/your/route/path

This means:

  • /home page has its own notes
  • /about page has its own notes
  • /products/123 page has its own notes

🎨 Styling

The component comes with a clean, minimalistic design out of the box. If you need to customize the appearance, you can override the CSS classes:

/* Custom styling example */
.floating-notepad {
  /* Your custom styles */
}

.notepad-header {
  /* Header customization */
}

.notepad-textarea {
  /* Textarea customization */
}

🛠️ Development

Local Development

  1. Clone the repository
  2. Install dependencies: npm install
  3. Start development server: npm run dev
  4. Build for production: npm run build

Installation

The package is published on npm and ready to use:

# Install with npm
npm install vue-dev-notepad

# Install with yarn
yarn add vue-dev-notepad

# Install with pnpm
pnpm add vue-dev-notepad

After installation, follow the Usage section above to get started.

📋 Requirements

  • Vue 3.0+
  • Vue Router (for automatic route detection)

📄 License

MIT License - feel free to use in your projects!

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🐛 Issues

If you find any bugs or have feature requests, please create an issue on the GitHub repository.