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

@formcentric/client-vue

v1.0.0-beta

Published

Formcentric Client Vue wrapper with safe component lifecycle handling.

Readme

@formcentric/client-vue

Vue component wrapper for the Formcentric SDK with safer lifecycle handling.

What it does

  • exposes Formcentric SDK mounting via a Vue component API
  • serializes mount/teardown lifecycle internally
  • emits Vue events (ready, error)

Further information

For further Formcentric Client integration and development topics, see:

Themes

This package does not include a theme.

Use your own bundled theme assets (CSS + template script + variables) or runtime theme URLs.
For theme development/customization, see the Formcentric theme workspace:

Important semantics

This is a restart-based bridge, not a fully controlled Vue widget.

  • Most Formcentric config props are init-time props.
  • Changing them does not automatically update the running form.
  • Reinitialize explicitly by changing remountKey.

Current built-in restart triggers:

  • remountKey
  • embedId
  • formDefinition
  • data-fc-watch is legacy-only and is ignored for SDK/component mounts
  • if you rely on instance handoff semantics such as conflictBehavior='stop-existing', keep embedId stable

Warning (Framework semantics)

This package exposes a framework component API, but the embedded form runtime is still restart-based.

Treat it as an integration bridge, not like a native fully controlled Vue component.

Avoid:

  • expecting most prop changes to update the running form automatically
  • changing init-time props without also changing remountKey
  • using a changing framework/component key on FormcentricForm to force reloads (use remountKey instead)
  • passing fresh config objects every render and assuming they will be applied live
  • rapidly unmounting/remounting the component subtree as part of unrelated UI state changes, if form continuity matters

Props / Events

  • All Formcentric mount config keys are available as top-level props (except onReady and onError, which are exposed as Vue events).
  • Use normal Vue attributes (class, style, id, aria-*, etc.) on the component to control the wrapper <div>.
  • skip-theme-load and skip-templates-load are optional and are only applied when explicitly set.
  • If your app bundles theme CSS/templates itself, set both to true to skip runtime design/theme loading.
  • Events:
    • @ready
    • @error

Global defaults

Use provideFormcentricConfig(...) for subtree-wide defaults. Per-form props still win.

<script setup lang="ts">
import { provideFormcentricConfig, FormcentricForm } from '@formcentric/client-vue'

provideFormcentricConfig({
  srcUrl: 'https://form.formcentric.dev',
  requestHeaders: {
    'X-App': 'vue-app',
  },
})
</script>

<template>
  <FormcentricForm
    embed-id="your-embed-id"
    :request-headers="{ 'X-Form': 'contact' }"
  />
</template>

For non-Vue browser-global defaults, use configure(...) from @formcentric/client.

onReady / @ready

@ready fires after Formcentric initialization has completed successfully (runtime/assets/request/init flow finished and formapp.start(...) was called).

It does not guarantee a dedicated "first visible render" signal from Formapp.

Example (Local Theme Bundle)

<script setup lang="ts">
import { ref } from 'vue'
import { FormcentricForm } from '@formcentric/client-vue'
import './formcentric-theme/styles.css'
import './formcentric-theme/script.js'
import themeVariables from './formcentric-theme/_variables.json'

const language = ref('en')
const remountKey = ref(0)
const resolvedThemeVariables = (themeVariables || {}) as Record<string, unknown>

const toggleLanguage = () => {
  language.value = language.value === 'en' ? 'de' : 'en'
  remountKey.value += 1
}

const onReady = () => {
  // ready
}

const onError = (error: Error) => {
  console.error(error)
}
</script>

<template>
  <button @click="toggleLanguage">Toggle language</button>

  <FormcentricForm
    :remount-key="remountKey"
    embed-id="your-embed-id"
    src-url="https://form.formcentric.dev"
    :language="language"
    :theme-variables="resolvedThemeVariables"
    :style="{ minHeight: '400px' }"
    @ready="onReady"
    @error="onError"
  />
</template>