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

webx-5m

v0.0.1

Published

Vanilla ES module UI framework and CLI for WebX projects.

Readme

WebX 5M

WebX 5M is a lightweight vanilla ES module UI framework and FiveM NUI boilerplate. It gives you component files, reactive state, template bindings, scoped CSS, stores, lifecycle hooks, and CFX/NUI helpers without a build step for the runtime UI.

Features

  • Component-based UI with app.js, template.html, and optional style.css
  • Text interpolation with {{ expression }}
  • Event and action bindings with @click, @keyup.enter, and modifiers
  • JavaScript bindings with :title, :show, :class, :style, :ref, and more
  • Two-way form state with sync
  • Reactive data, props, and stores powered by Proxy
  • watch support for data, props, and store values
  • Props validation with Zod and an in-page error overlay
  • Control flow with <for>, <if>, <elseif>, and <else>
  • Scoped CSS with class name rewriting
  • onMounted and onUnmounted lifecycle hooks
  • onCfx and cfx.call helpers for FiveM NUI messages and callbacks

Create a Project

bunx webx-5m create my-app

This clones the WebX template, removes the template .git folder, and installs dependencies when a package.json is found.

To create the files without installing dependencies:

bunx webx-5m create my-app --no-install

Generate webx.json

After adding or removing components in web/components, run:

bunx webx-5m generate

The command scans component folders that contain both app.js and template.html, then updates web/webx.json.

Choose the main component manually:

bunx webx-5m generate --main home

Project Structure

web/
  index.html
  webx.json
  components/
    home/
      app.js
      template.html
      style.css
  directives/
    index.js
  stores/
    appStore.js
  wbx/
    app.js
    core/

Component Example

web/components/counter/app.js

import z from 'zod'

export default {
  template: 'Counter',
  props: {
    title: z.string()
  },
  data: {
    count: 0
  },
  method: {
    increment() {
      this.data.count++
    }
  },
  watch: {
    count(value, previousValue) {
      console.log('count changed:', previousValue, value)
    }
  }
}

web/components/counter/template.html

<template>
  <div class="counter">
    <h1>{{ title }}</h1>
    <p>{{ count }}</p>
    <button @click="increment">Increment</button>
  </div>
</template>

FiveM NUI

Receive dynamic NUI messages with onCfx:

import z from 'zod'

export default {
  onCfx: {
    'app:updateTitle': {
      schema: z.string(),
      handler(title) {
        this.data.name = title
      }
    }
  }
}

Call a NUI callback with cfx.call:

const response = await this.cfx.call('counter:getValue', {
  count: this.data.count
}, {
  ok: true,
  value: this.data.count
})

The third argument is mock data for browser development.

Documentation

The documentation app lives in docs and is built with Next.js and Fumadocs.

cd docs
npm run dev

Open http://localhost:3000/docs.

License

GPL-3.0-only