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

gbformdesign

v0.1.0

Published

Vue 3 + Sass dynamic form designer & viewer (1:1 design of form-create-designer) with JSON import/export, form schema validation and a zero-lock-in data model.

Readme

GbFormDesign

Vue 3 + Sass 动态表单设计器 / 预览器,1:1 复刻 form-create-designer(packages/element-ui)的界面与交互:

  • 左侧图标栏(组件 / JSON)、组件面板(基础组件 + 布局组件)与大纲树(复制 / 删除 / 定位)
  • 中间工具条(PC / 平板 / 手机、撤销 / 重做、导入 / 预览 / 清空)与画布(拖拽新增、同层排序、拖入分栏列、字段悬浮工具)
  • 右侧配置面板(组件类型、字段名、隐藏、必填、宽度、默认值、提示、数值范围、选项、分栏列配置;表单配置页签)
  • 预览弹窗:表单模式 / 组件模式(生成 Vue 模板)/ HTML 模式,一键复制
  • JSON 面板:表单规则 / 表单配置编辑与导出
  • 表单预览器 FormViewer:必填与范围校验、默认值、分栏渲染、只读模式

安装

npm install gbformdesign element-plus @element-plus/icons-vue
import GbFormDesign from 'gbformdesign'
import 'gbformdesign/style.css'
app.use(ElementPlus).use(GbFormDesign)

使用

<FormDesigner
  v-model="components"
  :options="options"
  :meta="{ name: '采购申请' }"
/>

<FormViewer :form-config="components" />

props:modelValue(组件数组)、options(表单配置:name/description/labelWidth/size)、meta、fileName。 事件:update:modelValue、update:options、import、export、validate。 ref 方法:getComponents()、getForm()、importJSON()、exportJSON()、downloadForm()、validate()、clearForm()、undo()、redo()。

数据模型

{
  "id": "cmp_amount",
  "type": "input-number",
  "required": true,
  "min": 0,
  "max": 100000,
  "defaultValue": 500,
  "props": { "label": "申请金额", "variableName": "amount", "placeholder": "请输入金额" },
  "style": { "width": "50%" }
}

type:input / textarea / input-number / radio-group / checkbox-group / select / switch / date-picker / row;row 使用 props.columns 与 children[列][行]。

API

import {
  normalizeForm, validateForm, importForm, exportForm,
  enrichFormVariables, findFormVariable, countFormComponents,
  FormVariable, COMPONENT_TYPES, downloadJSON, pickJSONFile
} from 'gbformdesign'

importForm 兼容:组件数组、{ components, options }、GBflow 文档、form-create 的 { rule, options }、RuoYi 的 formStructure。

开发

npm install
npm run dev      # http://127.0.0.1:5179
npm run build
npm test

版权

src/styles/fc/icon.css、designer.css、fonts/fc-icons.woff 取自 form-create-designer(MIT,Copyright (c) 2022 xaboy);src/styles/config.scss 改编自其 ConfigItem 样式。

License

MIT