Skip to content

Directix Playground

Configure directives interactively and generate code for Vue 2, Vue 3, composables, and Nuxt.

Quick Code Generatorv-debounce - Debounce function execution
<template>
  <div v-debounce="options">
    <!-- Your content here -->
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

// Configure directive options
const options = {
  // Add your configuration here
}
</script>

Quick Start

  1. Select a Directive - Choose from the dropdown menu
  2. Choose Vue Version - Toggle between Vue 2 and Vue 3
  3. Select Output Format - Template syntax or Composable
  4. Copy Code - Click copy and paste into your project

Features

  • 57+ Directives - Full coverage of all Directix directives
  • Vue 2 & Vue 3 - Generate code for either version
  • Composables - Generate composable API code
  • TypeScript Ready - Full type definitions included

Categories

CategoryDescriptionDirectives
EventEvent handling directivesv-click-outside, v-debounce, v-throttle, v-long-press, v-hover, v-hotkey, v-click-delay
FormForm input directivesv-copy, v-focus, v-mask, v-trim
FormatText formatting directivesv-uppercase, v-lowercase, v-capitalcase, v-number, v-money, v-truncate, v-ellipsis
VisibilityVisibility controlv-lazy, v-intersect, v-visible, v-loading
ScrollScroll behaviorv-scroll, v-infinite-scroll, v-sticky
SecuritySecurity featuresv-permission, v-sanitize
UIUI enhancementsv-ripple, v-click-wave, v-tooltip, v-draggable, v-context-menu, v-fullscreen, v-skeleton, v-blur, v-fade
DataData visualizationv-counter, v-progress, v-countdown
UtilityUtility directivesv-watermark, v-print, v-export, v-highlight

Usage Example

vue
<template>
  <!-- Use generated directive code here -->
  <input v-debounce="{ handler: handleSearch, wait: 300 }" />
</template>

<script setup>
import { ref } from 'vue'

const searchText = ref('')

function handleSearch(event) {
  console.log('Searching:', event.target.value)
}
</script>

Resources

Released under the MIT License.