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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gooonzick/wizard-vue

v1.3.0

Published

Vue 3 integration for Wizard framework

Readme

@gooonzick/wizard-vue

Vue 3 Composition API integration for the Wizard framework.

Features

  • Vue 3 Composable - useWizard() composable with reactive ComputedRef values
  • Organized API - State grouped into logical slices (state, validation, navigation, loading, actions)
  • Navigation History - canGoBack and stepHistory for history-based back navigation
  • Granular Composables - Fine-grained subscriptions with useWizardData(), useWizardNavigation(), etc.
  • v-model Support - useWizardField() for writable computed refs
  • Optional Provider - WizardProvider for sharing state via provide/inject
  • Full Type Safety - TypeScript generics for your data types

Installation

npm install @gooonzick/wizard-vue @gooonzick/wizard-core
# or
pnpm add @gooonzick/wizard-vue @gooonzick/wizard-core
# or
yarn add @gooonzick/wizard-vue @gooonzick/wizard-core

Quick Start

Basic Usage with Composition API

<script setup lang="ts">
import { useWizard } from "@gooonzick/wizard-vue";
import { createLinearWizard } from "@gooonzick/wizard-core";

interface FormData {
  name: string;
  email: string;
  age: number;
}

const definition = createLinearWizard<FormData>({
  id: "my-wizard",
  steps: [
    { id: "personal", title: "Personal Info" },
    { id: "contact", title: "Contact" },
    { id: "review", title: "Review" },
  ],
});

const { state, navigation, actions } = useWizard({
  definition,
  initialData: { name: "", email: "", age: 0 },
});
</script>

<template>
  <div>
    <h2>{{ state.currentStep.value?.title }}</h2>

    <div v-if="state.currentStepId.value === 'personal'">
      <input
        :value="state.data.value.name"
        @input="
          actions.updateField('name', ($event.target as HTMLInputElement).value)
        "
        placeholder="Name"
      />
    </div>

    <div v-else-if="state.currentStepId.value === 'contact'">
      <input
        :value="state.data.value.email"
        @input="
          actions.updateField(
            'email',
            ($event.target as HTMLInputElement).value,
          )
        "
        placeholder="Email"
      />
    </div>

    <div v-else-if="state.currentStepId.value === 'review'">
      <p>Name: {{ state.data.value.name }}</p>
      <p>Email: {{ state.data.value.email }}</p>
    </div>

    <button
      @click="navigation.goPrevious"
      :disabled="!navigation.canGoPrevious.value"
    >
      Previous
    </button>

    <button @click="navigation.goNext" :disabled="!navigation.canGoNext.value">
      Next
    </button>
  </div>
</template>

Using WizardProvider for Shared State

<!-- App.vue -->
<script setup lang="ts">
import { WizardProvider } from "@gooonzick/wizard-vue";
import { createLinearWizard } from "@gooonzick/wizard-core";
import WizardSteps from "./WizardSteps.vue";
import WizardNavigation from "./WizardNavigation.vue";

const definition = createLinearWizard({
  id: "my-wizard",
  steps: [
    { id: "step1", title: "Step 1" },
    { id: "step2", title: "Step 2" },
  ],
});
</script>

<template>
  <WizardProvider :definition="definition" :initialData="{ name: '' }">
    <WizardSteps />
    <WizardNavigation />
  </WizardProvider>
</template>
<!-- WizardSteps.vue -->
<script setup lang="ts">
import { useWizardData, useWizardActions } from "@gooonzick/wizard-vue";

const { currentStepId, data } = useWizardData();
const { updateField } = useWizardActions();
</script>

<template>
  <div>
    <h2>Current: {{ currentStepId.value }}</h2>
    <input
      :value="data.value.name"
      @input="updateField('name', $event.target.value)"
    />
  </div>
</template>
<!-- WizardNavigation.vue -->
<script setup lang="ts">
import { useWizardNavigation } from "@gooonzick/wizard-vue";

const { canGoNext, canGoPrevious, goNext, goPrevious, goTo } =
  useWizardNavigation();
</script>

<template>
  <div>
    <button @click="goPrevious" :disabled="!canGoPrevious.value">
      Previous
    </button>
    <button @click="goNext" :disabled="!canGoNext.value">Next</button>
  </div>
</template>

API Reference

Composables

useWizard(options)

Main composable for wizard state management. Returns organized state slices.

Parameters:

  • definition: WizardDefinition<T> - Wizard configuration
  • initialData: T - Initial form data
  • context?: WizardContext - Optional context for validators/hooks
  • onStateChange?: (state) => void - State change callback
  • onStepEnter?: (stepId, data) => void - Step enter callback
  • onStepLeave?: (stepId, data) => void - Step leave callback
  • onComplete?: (data) => void - Completion callback
  • onError?: (error) => void - Error callback

Returns:

  • state - Current step and data (reactive refs)
  • validation - Validation state and errors
  • navigation - Navigation state and methods
  • loading - Async operation states
  • actions - Data mutations and validation

Granular Composables (require WizardProvider)

  • useWizardData<T>() - State slice only
  • useWizardNavigation() - Navigation slice only
  • useWizardValidation() - Validation slice only
  • useWizardLoading() - Loading slice only
  • useWizardActions<T>() - Actions slice only
  • useWizardField<T>() - Writable field binding for v-model

Components

WizardProvider

Provider component for sharing wizard state via provide/inject.

Props: Same as useWizard options, plus children

TypeScript Support

All composables and components are fully typed with TypeScript generics:

interface MyFormData {
  name: string;
  email: string;
}

const { state, actions } = useWizard<MyFormData>({
  definition,
  initialData: { name: "", email: "" },
});

// TypeScript knows the shape of data
actions.updateField("name", "John"); // ✓ OK
actions.updateField("invalid", "value"); // ✗ Error

License

MIT