vue3-reusability

Official

Reuse Vue 3 behavior with SSR-safe directives & plugins

Authore-xode
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It helps you reuse Vue 3 behavior across the Vue SSR Starter Kit without misusing composables or components, specifically for DOM-level actions via custom directives and app-wide setup via plugins.

Core Features & Use Cases

  • Custom directives (v-xxx): Reuse low-level DOM behavior such as focus handling, click-outside, observers, and element styling that a template ref cannot express cleanly.
  • Directive binding support: Use directive value, arg, and modifiers, and implement effects in the appropriate client-only hooks.
  • Vue plugins (app.use): Perform one-time app installation tasks like registering global directives and app-level provide values, with safe SSR guards.
  • SSR safety rules: Ensures directive DOM hooks run client-side only and plugin install() guards browser APIs when running during SSR.

Quick Start

Write a local directive in a <script setup> block as a const named vXxx, then use it in the template as v-xxx while relying on mounted/updated hooks for client-side DOM effects.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: vue3-reusability
Download link: https://github.com/e-xode/vue-ssr/archive/main.zip#vue3-reusability

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.