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

@formjourney/vue

v0.1.0

Published

Vue 3 bindings for @formjourney/core — createVueForm + composables (useField/useStep/useForm) with v-model-ready refs

Downloads

149

Readme

@formjourney/vue

Vue 3 bindings for @formjourney/core. A form is created once and provided down the tree; composables expose it as refs, so fields bind with v-model and everything else is a computed ref.

Install

pnpm add @formjourney/vue @formjourney/core vue

Setup

Create and provide the form in a parent component; children consume it through the composables.

<script setup lang="ts">
import { provideFormJourney } from '@formjourney/vue';
import { createForm } from '@formjourney/core';
import Wizard from './Wizard.vue';

interface Values {
  email: string;
  tags: { name: string }[];
}

provideFormJourney<Values>(() =>
  createForm<Values>({
    initialValues: { email: '', tags: [] },
    steps: [{ id: 'account' }, { id: 'review' }],
  }),
);
</script>

<template>
  <Wizard />
</template>

provideFormJourney takes either CreateFormOptions (optionally with mode / reValidateMode) or a factory returning a FormCore — use the factory when you add plugins. Provide and consume must live in different components: a parent provides, its descendants inject. That is the Vue equivalent of React's FormProvider wrapping children.

useField — v-model

Returns a writable model ref for v-model, plus reactive error / touched.

<script setup lang="ts">
import { useField } from '@formjourney/vue';
const email = useField<Values, 'email'>('email');
</script>

<template>
  <input v-model="email.model.value" @blur="email.onBlur" />
  <span v-if="email.error.value">{{ email.error.value }}</span>
</template>

useStep

Navigation and per-step validation, all as computed refs. next() validates the current step and advances only if it passes; conditional (hidden) steps are respected.

const step = useStep();
// step.currentStep, step.activeSteps, step.index, step.isFirst, step.isLast
await step.next();
step.prev();

useForm

Whole-form state and submit.

const form = useForm<Values>();
// form.values, form.errors, form.isValid, form.isDirty,
// form.isSubmitting, form.submitCount (all computed refs)

await form.submit(async (values) => api.save(values));
await form.trigger('all');
form.resetField('email');
form.reset();

useFieldList

A dynamic array of fields. Errors follow their element across reorders and removals. Bind each row from a child component so its useField sits in that component's setup.

const skills = useFieldList<Values, 'tags'>('tags');
skills.append({ name: '' });
skills.removeAt(0);
skills.moveItem(0, 1);

useObserve

Reactively read one path, or the whole form with no argument.

const email = useObserve<Values, 'email'>('email'); // ComputedRef<string>
const all = useObserve<Values>(); // ComputedRef<Values>

Validation modes

provideFormJourney's options take mode and reValidateMode (onSubmit | onChange | onBlur), matching the React and Angular bindings.

  • mode — when a field is first validated, before it has an error.
  • reValidateMode — how a field re-validates once it already shows an error.

useField's v-model write and onBlur drive this. The default, mode: 'onSubmit' with reValidateMode: 'onChange', shows no errors while the user first types, but once an error appears it clears itself as they fix the field.

License

MIT