@flows/js

中文文档
1.24.2发布于 2026/10/26MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2426

Flows JS SDK - Build native product growth experiences, your way

原始使用文档
文档目录5 节
  1. Flows JavaScript SDK
  2. Installation
  3. Features
  4. Get started for free
  5. Contributing

Flows JavaScript SDK

The better way to build product adoption.

Documentation · Changelog · Examples · SDKs

Installation

For full setup instructions, see our Quickstart guide.

npm install @flows/js @flows/js-components

@flows/js SDK handles the lightweight embedding of Flows, while @flows/js-components provides a set of built-in components to get you started quickly. Alternatively, you can bring your own components.

Call init and setupJsComponents and pass in your Organization ID and Environment.

import { init } from "@flows/js";
import { setupJsComponents } from "@flows/js-components";
import * as components from "@flows/js-components/components";
import * as tourComponents from "@flows/js-components/tour-components";

// Depending on your setup, link the CSS, copy-paste it to your codebase, or import it in your JS files
import "@flows/js-components/dist/index.css"

init({
  organizationId: "YOUR_ORGANIZATION_ID", // Find this in Settings > General
  userId: "YOUR_USER_ID", // Identify the user
  environment: "production", // Default environment
});
setupJsComponents({
  components: { ...components },
  tourComponents: { ...tourComponents },
});`

Add <flows-floating-blocks> at the end of the <body> to handle rendering of floating components.

<body>
  <!-- Your app code -->

  <flows-floating-blocks></flows-floating-blocks>
</body>

Features

Meet Flows, the flexible platform for building in-app experiences. Focus on your product, not creating one-off logic.

  • Build powerful in-app experiences to drive product growth
  • Create surveys and collect feedback
  • Embed components directly into your app
  • Create onboarding, product adoption, in-app messaging, growth experiments, and more
  • Bring your own UI components or use Flows' built-in components

Visit our website to learn more about Flows

Get started for free

The fastest and most reliable way to get started with Flows is signing up for free. Your first 100 MTUs (monthly tracked users) are free every month. See our pricing for more details.

Contributing

We ❤️ contributions big and small. If you have any ideas for improvements, either submit an issue or create a pull request.


Created by rbnd.studio.

版本与发布记录

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

版本发布日期距今
1.24.2latest2026/10/2620 天前
1.24.12026/09/042 个月前
1.24.02026/08/212 个月前
1.23.42026/08/133 个月前
1.23.32026/07/223 个月前
1.23.1-canary.0canary2026/07/223 个月前

关于 @flows/js 的常见问题

@flows/js 是什么?

Flows JS SDK - Build native product growth experiences, your way

如何安装 @flows/js?

在项目目录运行 npm install @flows/js,或使用 pnpm add / yarn add / bun add。

@flows/js 支持 TypeScript 吗?

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

@flows/js 支持 ESM 还是 CommonJS?

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

@flows/js 可以商用吗?

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

@flows/js 的下载量有多少?

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

@flows/js 还在维护吗?

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