由 `shadcn init` 生成的 Next.js App Router 项目,使用 Tailwind 4 与 `base-nova` 样式
surveyjs-shadcn-starter — Next.js 启动器模板
作者 surveyjs
基于 shadcn/ui 与 Next.js App Router 的 SurveyJS 起步模板,内置一个由 survey.json 驱动的多步骤结账表单。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
多步骤结账表单由 SurveyJS 根据根目录 `survey.json` 渲染,包含购物车动态矩阵与计算总额
通过 `survey-core` 附带的适配器样式表从 shadcn 设计令牌获取颜色、圆角和间距,并跟随明暗主题
浏览器内的 Edit JSON 面板可应用修改后的定义、查看 linter 结果或重置,但不保存任何内容
可作为 shadcn 组件安装到已有应用,添加两个文件与 `survey-core`、`survey-react-ui` 两个包
README 说明无环境变量、无数据库、无密钥
模板详细介绍
这是一个由 `shadcn init` 生成的 Next.js App Router 项目,使用 Tailwind 4 与 `base-nova` 样式,并加入一个多步骤结账表单。表单由 SurveyJS 根据项目根目录的 `survey.json` 渲染,内容包含购物车(动态矩阵与计算总额)、联系方式、配送、支付和复核步骤。表单通过 `survey-core` 附带的适配器样式表,从 shadcn 设计令牌获取颜色、圆角和间距,并跟随明暗主题切换。
README 说明项目没有环境变量、数据库或密钥。表单定义是根目录的普通 JSON,可直接修改标题或添加问题;也可以在浏览器中的 Edit JSON 面板应用修改后的定义、查看 linter 结果或重置为初始定义,该面板不保存任何内容,刷新即丢失。README 提到可用 SurveyJS 表单构建器可视化设计表单,再把 JSON 粘贴覆盖 `survey.json`。
README 还说明如何把表单加入已有的 shadcn 应用:通过 `npx shadcn@latest add` 安装,会添加 `components/survey-form.tsx` 和 `survey.json` 两个文件以及 `survey-core`、`survey-react-ui` 两个 npm 包,不添加任何 shadcn 组件。README 注明该安装地址的主机尚未上线,在此之前需本地运行 `npm run build && npm start` 并从 `http://localhost:3000/r/survey-form.json` 添加。组件通过 `onComplete` 属性报告完成,传入 `prefillData` 会添加一个填充当前页的“Prefill demo data”按钮。保存响应需要自行接入,README 指向 SurveyJS 后端集成文档。
README 明确该模板只保持一个页面和一个表单,更大的需求可参考完整 SurveyJS 演示、MIT 演示应用或服务端集成。关于依赖策略,README 说明仓库保留 `package-lock.json`,`package.json` 使用 caret 范围以便 `npm ci` 复现测试过的依赖树;每周 CI 会在其上安装当天的 `survey-core` 与 `survey-react-ui` 进行构建和冒烟测试,但不提交任何更改,锁文件更新交由 Renovate 或 Dependabot 通过审查后的 PR 完成。
适合你的项目吗?
适用场景
- 作为从零开始搭建 SurveyJS 与 shadcn/ui 结合项目的起步模板
- 在本地修改 `survey.json` 并即时查看多步骤表单的渲染效果
- 在浏览器 Edit JSON 面板中试验表单定义并查看 linter 反馈
- 把 `components/survey-form.tsx` 与 `survey.json` 安装到已有的 shadcn 应用中
- 通过 `onComplete` 与 `prefillData` 属性接入表单完成回调和预填演示数据
适合人群
- 希望以 shadcn/ui 样式呈现 SurveyJS 多步骤表单的开发者
- 需要可克隆、可复现依赖树的 SurveyJS 起步项目的团队
- 计划自行接入后端保存表单响应的项目
- 想先通过编辑 JSON 快速试验表单定义的人
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后依次运行 `npm install` 与 `npm run dev`;也可用 `npx create-next-app@latest --example <仓库地址> my-app` 创建新项目
- 2
README 说明无需环境变量、数据库或密钥
- 3
把表单加入已有 shadcn 应用时,README 注明安装地址的主机尚未上线,需先本地运行 `npm run build && npm start`,再从 `http://localhost:3000/r/survey-form.json` 添加
- 4
更换 shadcn 样式需修改 `survey-form.tsx` 中的一行导入,指向 `survey-core/themes/adapters/shadcn-<style>.css`,其中 `<style>` 对应 `components.json` 里的 style
- 5
保存响应需要自行实现,README 指向 SurveyJS 后端集成文档,并说明 `survey-form.tsx` 中的处理函数标记了接入位置
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 将表单安装到已有 shadcn 应用时,README 注明该安装地址的主机尚未上线;在此之前需本地运行 npm run build && npm start,并从 http://localhost:3000/r/survey-form.json 添加。
- 保存表单响应需要自行接入后端,README 仅指向 SurveyJS 后端集成文档,模板本身不包含存储实现。
- 该模板仅保持一个页面和一个表单,更大的需求需参考其他 SurveyJS 演示或自行扩展。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
> The host is not live yet. Until it is, run `npm run build && npm start` here and add from `http://localhost:3000/r/survey-form.json`.
README 原文
Saving the response is yours to wire: the handler in `survey-form.tsx` marks the spot — see [SurveyJS backend integration](https://surveyjs.io/backend-integration).
README 原文
https://github.com/surveyjs/surveyjs-shadcn-starter/blob/main/LICENSEhttps://github.com/surveyjs/surveyjs-shadcn-starter/blob/main/README.mdThis starter stays one page and one form. Anything bigger has a home already:
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-15。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Next.js · React
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-25
- 截图检查日期
- 2026-10-15
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Next.js。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: codex-user-requested-batch-review-20261015 · 2026-10-15
查看当时使用的来源资料
SHA-256: 2d71074780304514ca44ae44f23ab92efe02411c027d070f46f165d5098665e6
2026-10-15T00:08:13.157Z
来源文件 / 仓库# surveyjs-shadcn-starter
SurveyJS in a shadcn/ui app — a themed multi-step form, ready to start from. MIT.
A fresh `shadcn init` project (Next.js App Router, Tailwind 4, the `base-nova` style) with one addition: a multi-step checkout form — a cart with a dynamic matrix and computed totals, contact, shipping, payment, review — rendered by [SurveyJS](https://surveyjs.io) from `survey.json`. The form takes its colors, radius and spacing from your shadcn tokens through the adapter stylesheet that ships in `survey-core`, and follows the light/dark toggle.
## Quick start
```bash
git clone https://github.com/surveyjs/surveyjs-shadcn-starter
cd surveyjs-shadcn-starter
npm install
npm run dev
```
Or start a new project from it:
```bash
npx create-next-app@latest --example https://github.com/surveyjs/surveyjs-shadcn-starter my-app
```
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsurveyjs%2Fsurveyjs-shadcn-starter)
No environment variables, no database, no keys.
## First thing to try: edit `survey.json`
The form is plain JSON at the project root. Change a title, add a question, and the page reloads with it. To design a form visually, build it in the [SurveyJS form builder](https://surveyjs.io/create-free-survey) and paste its JSON over `survey.json`.
The **Edit JSON** panel under the form does the same in the browser: apply a changed definition, see the linter's findings, reset to the shipped one. It keeps nothing — reload and it is gone.
## Add the form to an existing shadcn app
```bash
npx shadcn@latest add https://shadcn.demos.surveyjs.io/r/survey-form.json
```
> The host is not live yet. Until it is, run `npm run build && npm start` here and add from `http://localhost:3000/r/survey-form.json`.
The item installs two files — `components/survey-form.tsx` and `survey.json` — and two npm packages, `survey-core` and `survey-react-ui`. It adds no shadcn component. It reports completion through its `onComplete` prop:
```tsx
import { SurveyForm } from "@/components/survey-form"
<SurveyForm onComplete={(data) => console.log(data)} />
```
Pass `prefillData` (answers keyed by question name, defined outside the component so it stays the same object) to add a "Prefill demo data" button that fills the current page; the starter page does this. Without it there is no button.
Saving the response is yours to wire: the handler in `survey-form.tsx` marks the spot — see [SurveyJS backend integration](https://surveyjs.io/backend-integration).
**Another shadcn style** changes one import in `survey-form.tsx`, `survey-core/themes/adapters/shadcn-<style>.css`, where `<style>` is the `style` in your `components.json`:
`default`, `new-york`, `base-nova`, `base-vega`, `base-maia`, `base-lyra`, `base-mira`, `base-luma`, `base-sera`, `base-rhea`.
## Dependency policy
A starter people clone should install what was tested: `package-lock.json` is kept in the repo and `package.json` uses caret ranges, so `npm ci` reproduces the tested tree. A weekly CI run installs today's `survey-core` and `survey-react-ui` on top of it, without saving, and builds and smoke-tests against them — an alarm, not an update. It commits nothing. Moving the lockfile forward is Renovate's or Dependabot's job, through a reviewed pull request.
## What this is not
This starter stays one page and one form. Anything bigger has a home already:
- [The full SurveyJS demo](https://app.demos.surveyjs.io) — Survey Creator, PDF Generator, Dashboard and many more forms.
- [The MIT demo application](https://github.com/surveyjs/surveyjs-demo-mit) — a complete app built on the MIT-licensed libraries only.
- [Server integration](https://surveyjs.io/backend-integration) — storing definitions and responses in your own backend.
## License
[MIT](LICENSE) © Devsoft Baltic OÜ
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

ai-website-cloner-template
Clone any website with one command using AI coding agents
Next.js · 启动器

Next.js SaaS Starter
Next.js SaaS Starter 是 Next.js 官方维护的 SaaS 起点模板,定位介于学习资源和可直接部署的脚手架之间。
Next.js · SaaS

Next.js Commerce
Next.js Commerce 是 Vercel 团队维护的电商启动模板,基于 Next.js App Router 构建,采用服务端渲染、React Server Components、Server Actions …
Next.js · 电商

Next-js-Boilerplate
Next-js-Boilerplate 是一个面向 Next.js 16、Tailwind CSS 4 和 TypeScript 的启动器,核心定位是开发者体验优先。
Next.js · 启动器

tailwind-nextjs-starter-blog
tailwind-nextjs-starter-blog 是一个面向个人技术博客的 Next.js 与 Tailwind CSS 启动模板,其 v2 版本基于 App Router 与 React Server Comp…
Next.js · 博客

next-forge
Production-grade Turborepo template for Next.js apps.
Next.js · 启动器
