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

@wippy-fe/webcomponent-vue

v0.0.16

Published

Vue 3 integration layer for Wippy web components — extends @wippy-fe/webcomponent-core with reactive props, Pinia, and provider injection.

Downloads

883

Readme

@wippy-fe/webcomponent-vue

Vue 3 integration layer for Wippy web components. Extends @wippy-fe/webcomponent-core with reactive props, Pinia state management, and Vue provider injection.

What it does

  • Vue app lifecycle — creates and mounts a Vue 3 app inside the shadow DOM container
  • Reactive props — attribute changes flow through a Vue ref() that components can inject()
  • Pinia — automatically installed on every Vue app instance
  • Provider injection — exposes props, errors, and an event emitter via Vue's provide/inject
  • Plugin support — install additional Vue plugins via vueConfig.plugins
  • Custom providers — hook into the Vue app before mount via vueConfig.providers

What it does NOT do

  • DOM setup, CSS loading, or prop parsing — that's handled by @wippy-fe/webcomponent-core (see its README for CSS guide)
  • Component registration — use define(import.meta.url, YourElement) (re-exported from core)
  • Any React/Svelte/etc. integration — this package is Vue-only

Quick Start

import { WippyVueElement, define } from '@wippy-fe/webcomponent-vue'
import MyApp from './app/my-app.vue'
import stylesText from './styles.css?inline'
import pkg from '../package.json'

class MyElement extends WippyVueElement {
  static get wippyConfig() {
    return {
      propsSchema: pkg.wippy.props,
      hostCssKeys: ['fontCssUrl', 'themeConfigUrl', 'primeVueCssUrl', 'iframeCssUrl'],
      containerClasses: ['h-full'],
      inlineCss: stylesText,
    }
  }

  static get vueConfig() {
    return {
      rootComponent: MyApp,
    }
  }
}

export async function webComponent() {
  return MyElement
}

define(import.meta.url, MyElement)

API Reference

WippyVueElement (abstract class)

Extends WippyElement from @wippy-fe/webcomponent-core.

Static getters to override

static get wippyConfig(): WippyElementConfig  // from core — see core README for full options
static get vueConfig(): WippyVueElementConfig

WippyVueElementConfig

interface WippyVueElementConfig {
  /** The root Vue component to mount. */
  rootComponent: Component

  /** Additional Vue plugins to install (beyond Pinia). */
  plugins?: Array<{ install: (app: App) => void }>

  /** Extra providers to inject. Called after standard providers are set up. */
  providers?: (app: App, element: WippyVueElement) => void
}

Lifecycle hooks

WippyVueElement implements onMount, onUnmount, and onPropsChanged from the base class. You can still override the other hooks from WippyElement:

| Hook | Available? | Notes | |------|-----------|-------| | onInit(shadow) | Override freely | Runs before CSS/container | | onMount(...) | Implemented by WippyVueElement | Do not override — use vueConfig instead | | onReady() | Override freely | Runs after Vue app is mounted and state is ready | | onError(error) | Override freely | Custom error handling | | onUnmount() | Implemented by WippyVueElement | Do not override | | onPropsChanged(...) | Implemented by WippyVueElement | Updates reactive refs automatically |

Provider Symbols

Import these in your Vue components to access injected values:

import { EVENT_PROVIDER, PROPS_PROVIDER, PROPS_ERROR_PROVIDER } from '@wippy-fe/webcomponent-vue'

// In setup()
const props = inject(PROPS_PROVIDER)!        // Ref<Record<string, unknown>>
const errors = inject(PROPS_ERROR_PROVIDER)!  // Ref<string[]>
const emit = inject(EVENT_PROVIDER)!          // (event: string, detail?) => void

| Symbol | Type | Description | |--------|------|-------------| | EVENT_PROVIDER | (event: string, detail?) => void | Emits CustomEvents from the host element | | PROPS_PROVIDER | Ref<Record<string, unknown>> | Reactive parsed props from attributes | | PROPS_ERROR_PROVIDER | Ref<string[]> | Reactive list of prop parsing errors |

Re-exports from core

For convenience, this package re-exports everything from @wippy-fe/webcomponent-core:

  • WippyElement, define
  • WippyElementConfig, WippyPropsSchema, WippyPropDefinition, HostCssKey, ParseResult

Adding Plugins

static get vueConfig() {
  return {
    rootComponent: MyApp,
    plugins: [createI18n({ /* ... */ })],
  }
}

Custom Providers

import { MY_SERVICE } from './services'

static get vueConfig() {
  return {
    rootComponent: MyApp,
    providers(app, element) {
      app.provide(MY_SERVICE, new MyService(element))
    },
  }
}

Migration from monolithic pattern

Before — every component duplicates ~170 lines:

class MyElement extends HTMLElement {
  private vueApp: App | null = null
  private props: Ref<...> = ref({})
  // ... shadow DOM, CSS loading, prop parsing, Vue setup, events ...
}

After — ~20 lines:

class MyElement extends WippyVueElement {
  static get wippyConfig() {
    return {
      propsSchema: pkg.wippy.props,
      hostCssKeys: ['fontCssUrl', 'themeConfigUrl', 'primeVueCssUrl', 'iframeCssUrl'],
      containerClasses: ['h-full'],
      inlineCss: stylesText,
    }
  }
  static get vueConfig() {
    return { rootComponent: MyApp }
  }
}

All the boilerplate (shadow DOM, CSS, prop parsing, Vue lifecycle, Pinia, providers) is handled by the base classes.