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

@tgb-form/vue

v0.0.5

Published

An easy to use form library for Vue, built on top of @tgb-form/core.

Downloads

377

Readme

@tgb-form/vue

Vue 3 adapter for TGB Form definitions and TanStack Vue Form.

The adapter renders a RuntimeFormDefinition with TgbForm, resolves fields through a Vue renderer registry, and passes TanStack field state to renderer components.

Supported Flows

  • Implicit: TgbForm creates the TanStack form instance and reads renderers from TgbFormProvider.
  • Hybrid: pass either instance or renderers, while TgbForm supplies the rest.
  • Fully explicit: pass both instance and renderers directly to TgbForm.

Public API

  • TgbFormProvider
  • TgbForm
  • TgbFormField
  • createVueRendererRegistry
  • BaseVueRendererProps
  • VueRenderer
  • VueRendererField
  • VueRendererProps
  • VueRendererRegistry
  • TgbFormTanStackForm

Quick Start

<script setup lang="ts">
  import { defineForm, FieldDataType, ValidationRuleKind } from '@tgb-form/core';
  import { TgbForm, TgbFormProvider, createVueRendererRegistry } from '@tgb-form/vue';
  import TextField from './TextField.vue';

  const definition = defineForm({
    fields: {
      email: {
        type: FieldDataType.String,
        defaultValue: '',
        label: 'Email',
        component: 'email-input',
        props: { placeholder: '[email protected]' },
        rules: [{ kind: ValidationRuleKind.Email, message: 'Enter a valid email' }],
      },
    },
  });

  const renderers = createVueRendererRegistry({
    byName: {
      'email-input': TextField,
    },
    byType: {
      [FieldDataType.String]: TextField,
    },
  });
</script>

<template>
  <TgbFormProvider :renderers="renderers">
    <TgbForm
      :definition="definition"
      :tanstack-options="{ onSubmit: async ({ value }) => console.log(value) }"
    />
  </TgbFormProvider>
</template>

Component Props

TgbFormProvider accepts:

  • renderers: renderer registry shared by descendant forms and fields.

TgbForm accepts:

  • definition: normalized form definition.
  • instance: optional TanStack form instance created by useForm.
  • tanstackOptions: options merged into toTanStackOptions when TgbForm creates the form.
  • renderers: renderer registry; overrides provider.
  • fields: optional list of field names to render.

TgbFormField accepts:

  • name: field name.
  • field: field definition.
  • renderers: optional renderer registry; overrides provider.

Renderer props include name, field, form, label, description, props, value, and errors.

Write renderers as Vue SFCs and import them into the component that creates the registry. See TextField.vue in the quick-start example.