React + TypeScript + Vite + Tailwind 起步模板
custom-widget-template — Vite 后台模板
作者 tago-io
TagoIO 自定义小组件起步模板,基于 React、TypeScript、Vite 与 Tailwind,提供实时数据展示与回传示例。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
内置 DataDisplay 实时变量表格示例组件
内置 SendDataForm 向 TagoIO 设备回写数据的示例
使用 useWidget、useRealtimeData、useSendData 三个 SDK hooks
开发服务器默认运行在 http://localhost:5173
构建产物输出到 _dist/ 目录并上传至 TagoIO Files
模板详细介绍
该仓库是 TagoIO Custom Widget 的起步模板,README 说明其技术组合为 React + TypeScript + Vite + Tailwind。模板包含 TagoIOProvider 包裹应用入口、根组件 App,以及两个示例组件:DataDisplay 用于展示实时变量表格,SendDataForm 用于向 TagoIO 设备回写数据。
开发时执行 npm install 与 npm run dev,开发服务器运行在 http://localhost:5173;在 TagoIO 中创建 Custom Widget 并将 URL 指向本地转发地址即可实时测试。部署时先运行 npm run build,再把 _dist/ 目录内容上传到 TagoIO Files 的文件夹,并在 Custom Widget 设置中把 URL 指向该文件夹内的 index.html。
README 列出的 SDK hooks 包括 useWidget()(读取小组件配置与已配置变量)、useRealtimeData()(获取连接设备的实时数据记录)和 useSendData()(向 TagoIO 设备写入数据)。除上述内容外,README 未提供关于样式定制、状态管理、测试、鉴权细节或生产部署注意事项的更多说明。
适合你的项目吗?
适用场景
- 在 TagoIO 平台中创建并测试自定义小组件
- 展示连接设备的实时变量数据
- 从小组件界面把数据发送回 TagoIO 设备
- 以本地开发服务器配合 TagoIO 进行实时调试
适合人群
- 需要为 TagoIO 构建自定义小组件的开发者
- 熟悉 React 与 TypeScript 的前端开发者
- 希望参考实时数据读取与回写示例的团队
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
执行 npm install 安装依赖,再运行 npm run dev 启动开发服务器
- 2
开发服务器地址为 http://localhost:5173,在 TagoIO 中创建 Custom Widget 并设置 URL 为本地转发地址
- 3
部署前运行 npm run build,将 _dist/ 目录内容上传到 TagoIO Files 的文件夹
- 4
在 Custom Widget 设置中把 URL 指向该文件夹内的 index.html
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 Apache-2.0 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发;分发时需随附 Apache-2.0 许可证。
- 修改过的文件需显著标明改动,并保留相关版权、专利、商标及归属声明。
- 若原项目附有 NOTICE 文件,分发衍生作品时需保留其中适用的归属声明。
- 许可包含适用的贡献者专利授权;发起许可所述专利诉讼会终止该专利授权,且不授予商标使用权。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 Apache-2.0 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 开发调试需在 TagoIO 平台创建 Custom Widget,并将 URL 指向本地转发地址,因此使用该模板需要 TagoIO 账号与平台环境。
- 部署时必须将构建产物 _dist/ 目录内容上传到 TagoIO Files 的文件夹,依赖 TagoIO 平台的文件托管服务。
- 需在 TagoIO 的 Custom Widget 设置中把 URL 指向该文件夹内的 index.html,配置依赖 TagoIO 平台。
查看原文依据
no-charge, royalty-free, irrevocable copyright license
许可证原文
The dev server runs on `http://localhost:5173`. In TagoIO, create a Custom Widget and set the URL to your forwarded local address to test in real time.
README 原文
2. Upload the contents of the `_dist/` folder to your folder in **TagoIO Files**.
README 原文
https://github.com/tago-io/custom-widget-template/blob/main/LICENSEhttps://github.com/tago-io/custom-widget-template/blob/main/README.md3. In the Custom Widget settings, set the URL to point to `index.html` in that folder.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-15。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Vite · React
- 网站类型
- 后台 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-05-06
- 截图检查日期
- 2026-10-15
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16
查看当时使用的来源资料
SHA-256: 36e65855ecfcb3d7602da2e17e156f75abcda43f5366e3cf4bfa045668b23fef
2026-10-15T08:57:48.525Z
来源文件 / 仓库<br/>
<p align="center">
<img src="https://assets.tago.io/tagoio/tagoio.png" width="200px" alt="TagoIO"></img>
</p>
# TagoIO Custom Widget Template
A React + TypeScript + Vite + Tailwind starter for building [TagoIO Custom Widgets](https://docs.tago.io/docs/tagoio/widgets/custom-widget/).
## Getting started
```bash
npm install
npm run dev
```
The dev server runs on `http://localhost:5173`. In TagoIO, create a Custom Widget and set the URL to your forwarded local address to test in real time.
## Deploying
1. Run the build:
```bash
npm run build
```
2. Upload the contents of the `_dist/` folder to your folder in **TagoIO Files**.
3. In the Custom Widget settings, set the URL to point to `index.html` in that folder.
## Project structure
```
src/
├── main.tsx — TagoIOProvider wraps the app
├── App.tsx — root component
└── components/
├── DataDisplay.tsx — real-time variable table
└── SendDataForm.tsx — send data back to TagoIO
```
## SDK hooks used
| Hook | Purpose |
|---|---|
| `useWidget()` | Widget config and configured variables |
| `useRealtimeData()` | Live data records from connected devices |
| `useSendData()` | Write data back to a TagoIO device |
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

cove
The Cove Stack: 🏝️ minimal TanStack Start template with Vite+, Better Auth, Drizzle ORM, shadcn/ui
Vite · SaaS

vite-react-boilerplate
A production ready, scalable starter template for Vite + React
Vite · 启动器

kiaalap
Free admin dashboard template focused on education, online course and school management. Build using Bootstrap…
Vite · 后台

vital
Starter template for Vite with React (TypeScript). Supports Tailwind. Vitest and @react/testing-library config…
Vite · 启动器

react-vite-admin
This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. 全新技术栈的后台管理系统
Vite · 后台

typescript-react_best_practices-vite_template
<⚡⚛️> Start your React project with Vite following code best practices (TypeScript, Linting, testing, CI/CD…)
Vite · 启动器
