@formwerk/core

中文文档
0.14.4发布于 2025/12/13MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2.4万

原始使用文档
文档目录5 节
  1. ✨ Features
  2. 📚 Documentation
  3. 🤝 Contributing
  4. 📝 Credits
  5. ⚖️ License

Formwerk Logo

NPM Version NPM Downloads Documentation Discord GitHub Actions Workflow Status GitHub Sponsors License Follow us on BlueSky Follow us on X (formerly Twitter)

Formwerk

Formwerk is a Vue.js framework that simplifies forms by providing a comprehensive suite of composables for building accessible, high-quality, and scalable form components.

Unlike other libraries, Formwerk deliberately excludes UI components, recognizing that design needs vary across projects. Instead, it provides a rock-solid foundation of accessibility, validation, state management, and interaction patterns that work seamlessly with your custom styling. This separation allows you to maintain complete creative control while ensuring your forms meet the highest standards of functionality and user experience.

With Formwerk as your foundation, you get high-quality form capabilities without compromising on flexibility. Whether you're creating a design system or a standalone application, Formwerk handles the intricate details of forms, empowering you to create forms that are delightful to use.

✨ Features

  • 📦 Comprehensive: Ready-made composables for all common form elements.
  • ♿ Accessible: ARIA compliant with full keyboard navigation and semantic markup.
  • 🌐 i18n Ready: Built-in internationalization with RTL and number formatting support.
  • 🔌 Headless Architecture: Build form components with complete control over markup and styling.
  • ✅ Form Validation: Native HTML5 and Standard Schema libraries support.
  • 🎨 Styling Agnostic: Works with any CSS framework or plain CSS.
  • 🎮 Built-in Behaviors: Native-like keyboard interactions and focus management.
  • 🏗 Organization: Form groups and repeatable field arrays.
  • ⚡ SSR Ready: Full support for Server Side Rendering environments.
  • 🔄 State Management: Automatic form state and value tracking.
  • 🌳 Tree-shakable: Only include the composables you actually use.
  • 🎯 Type Safe: Full TypeScript support with generic typing.

📚 Documentation

You can find the documentation and demos here.

🤝 Contributing

You can contribute to Formwerk by reporting bugs, suggesting features, or submitting code changes. If you wish to submit code changes, please first discuss the change you wish to make via GitHub issues, Discord, or any other method.

You can visit the contributing guide for more information on how to contribute to Formwerk and how to get started.

📝 Credits

Formwerk takes great inspiration from multiple projects in the ecosystem, most notably:

⚖️ License

Formwerk is licensed under the MIT License. See the LICENSE file for details.

版本与发布记录

@formwerk/core 共发布 76 个版本,首次发布于 2024/09/01;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.14.4latest2025/12/1311 个月前
0.14.32025/11/2411 个月前
0.14.22025/11/2311 个月前
0.14.12025/10/111.1 年前
0.14.02025/09/281.1 年前
0.13.02025/09/181.2 年前

其他发布通道:nightly → 0.7.0-nightly.1738262185719。

关于 @formwerk/core 的常见问题

如何安装 @formwerk/core?

在项目目录运行 npm install @formwerk/core,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(>=3.5.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@formwerk/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@formwerk/core 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@formwerk/core 可以商用吗?

@formwerk/core 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@formwerk/core 的下载量有多少?

根据 npm 官方下载统计,@formwerk/core 在 2026/10/16 – 2026/11/14 这 30 天内被下载 23,716 次,日均约 791 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@formwerk/core 还在维护吗?

最新版本 0.14.4 发布于 2025/12/13(11 个月前);至今共发布 76 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/09/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。