Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ws-rush/pocket-vue

Repository files navigation

pocket-vue

npm version License: MIT

A maintained fork of petite-vue — an ultra-lightweight distribution of Vue optimized for progressive enhancement. It provides the same template syntax and reactivity mental model as standard Vue, without the overhead of a full SPA.

Note: petite-vue is no longer maintained. pocket-vue picks up where it left off with bug fixes and feature requests.

Why pocket-vue?

  • ~9kb gzipped — drop it in, no build step required
  • Vue-compatible — same template syntax and reactivity you already know
  • Progressive enhancement first — layer interactivity onto existing server-rendered pages
  • Framework friendly — works with Django, Rails, Laravel, ASP.NET, or any server-side setup

Quick Start

<script src="https://unpkg.com/pocket-vue" defer init></script>
<div v-scope="{ count: 0 }">
 {{ count }}
 <button @click="count++">Increment</button>
</div>

CDN

<script src="https://unpkg.com/pocket-vue"></script>
<!-- or -->
<script src="https://cdn.jsdelivr.net/npm/pocket-vue"></script>

npm

npm install pocket-vue
import { createApp } from 'pocket-vue'

Installation

For detailed setup instructions, bundle options, and usage with various frameworks, see the full documentation.

Features

Directive Description
v-scope Declare reactive state
v-model Two-way data binding
v-if / v-else Conditional rendering
v-for List rendering
v-on / @ Event handling
v-bind / : Attribute binding
v-text Text content binding
v-html Inner HTML binding
v-show Toggle visibility
v-effect Reactive side effects

Documentation

Full documentation, guides, and API reference are available at pocket-vue.wusaby.com.

To run the docs locally:

pnpm docs:dev

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT

About

petite-vue fork with plugins

Resources

License

Contributing

Stars

Watchers

Forks

Packages

Contributors

Languages

  • HTML 59.2%
  • TypeScript 37.0%
  • JavaScript 2.6%
  • CSS 1.2%

AltStyle によって変換されたページ (->オリジナル) /