Astro 静态构建,默认零 JS,交互由 Alpine.js 在标记中声明
astro-njx-saas — Astro SaaS模板
作者 njbSaab
基于 Astro、njX UI 与 Alpine.js 的产品落地页起始模板,包含英雄区、导航、功能卡片、评价滑块、联系表单与主题切换等静态页面区块。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
引入 njx-ui/css/style.min.css 即可使用 njX UI 样式类,无需 Tailwind 或设计令牌
内置 9 套主题,通过 data-theme 切换并用 localStorage 持久化,首次绘制前恢复
包含英雄区、导航、About、Features、Showcase、Reviews 滑块、联系表单、社交胶囊、页脚和一次性弹窗等区块
Reviews 滑块支持自动播放、进度条、前后按钮、圆点与触摸滑动
品牌与链接集中在 src/config.ts,卡片与幻灯片等数据以数组形式放在各组件中
模板详细介绍
astro-njx-saas 是一个产品落地页起始模板,README 说明其技术组合为 Astro(负责组件与静态构建)、njX UI(npm 包 njx-ui,提供卡片、渐变、滑块、模态等样式类)和 Alpine.js(负责主题切换、滑块、表单等交互,状态直接写在标记中)。模板不使用 Tailwind,也不需要配置设计令牌,只需引入 njx-ui/css/style.min.css。
页面内容由 src/pages/index.astro 组装,包含固定玻璃导航栏、全视口英雄区(带可点击复制的公告胶囊与渐变 CTA)、指标卡形式的 About、三种展示卡样式的 Features、清单加迷你卡片网格的 Showcase、带自动播放与进度条及触摸滑动的 Reviews 滑块、渐变外壳的联系表单与成功提示、社交胶囊、页脚,以及可配置的每位访客仅出现一次的“star us”模态框。
定制方式集中在三处:src/config.ts 管理品牌名、链接、英雄区胶囊文案和弹窗延迟(设为 0 可禁用);About、Features、Showcase、Reviews 组件内的数据数组管理指标、卡片、清单和幻灯片;标题与段落直接写在对应区块组件中。主题方面,njX UI 提供 9 套主题,通过 html 元素的 data-theme 属性切换,导航栏圆点会把选择保存到 localStorage,布局在首次绘制前恢复以避免闪烁。
README 未提供关于表单后端处理、SEO 元数据、无障碍支持、浏览器兼容范围或测试方式的具体说明。模板为静态输出,README 称可部署到任意主机,构建命令为 npm run build,输出目录为 dist,并给出 Vercel、Netlify 和 Cloudflare Pages 的部署入口。
适合你的项目吗?
适用场景
- 快速搭建产品发布或 SaaS 介绍类单页落地页
- 需要多主题切换和本地记忆的静态营销页面
- 希望用现成 UI 类库而非从零编写样式的 Astro 项目
- 作为学习 Astro 组件组织与 Alpine.js 标记内状态管理的示例
适合人群
- 使用 Astro 并希望减少样式配置工作的开发者
- 接受 njX UI 组件类与 Alpine.js 交互方式的团队
- 需要静态输出并部署到 Vercel、Netlify 或 Cloudflare Pages 的项目
- 希望以少量文件完成品牌替换与内容填充的落地页需求
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
克隆仓库后执行 npm install,再用 npm run dev 启动,默认地址为 http://localhost:4321
- 2
在 src/config.ts 中修改品牌名、链接、英雄区胶囊文案与弹窗延迟,延迟设为 0 可禁用弹窗
- 3
在 About、Features、Showcase、Reviews 组件的数组以及各区块组件中替换文案与数据
- 4
构建命令为 npm run build,输出目录为 dist,可部署到任意静态主机
- 5
README 未说明联系表单的提交后端与数据处理方式,使用前需自行确认或补充
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 项目资料提及可选付费版本或功能;本次仅收录公开免费代码,不包含付费升级。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
https://github.com/njbSaab/astro-njx-saas/blob/main/LICENSEhttps://github.com/njbSaab/astro-njx-saas/blob/main/README.mdPermission is hereby granted, free of charge
许可证原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-13。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Astro
- 网站类型
- SaaS · 企业官网 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-12
- 截图检查日期
- 2026-10-13
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16
查看当时使用的来源资料
SHA-256: a18d6a41b06b4788ecaf20abcaceee10ba41b8162f397705cfc4d5b0ff3b584b
2026-10-13T00:33:32.292Z
来源文件 / 仓库# astro-njx-saas
[](https://vercel.com/new/clone?repository-url=https://github.com/njbSaab/astro-njx-saas) [](https://app.netlify.com/start/deploy?repository=https://github.com/njbSaab/astro-njx-saas)
> Part of **[njX Astro Themes](https://njxui.dev/themes)** — ecommerce storefronts & landing pages by one author, free today, Pro versions on the way.
**Product landing starter — Astro + [njX UI](https://njxui.dev) (npm: `njx-ui`) + Alpine.js.**
One CSS import, nine runtime themes, ~30 lines of custom chrome. Every element on
the page is an njX UI class; interactivity is plain Alpine `x-data` right in the
markup; Astro renders it all to static HTML.
**Live demo:** https://astro-njx-saas.pages.dev

## What you get
- **Full-viewport hero** with a signature glow, a click-to-copy announcement pill and gradient CTAs
- **Sticky glass navbar** — gradient logo, anchor links, 9-theme dot switcher, burger menu on mobile
- **About** with metric cards, **Features** on three showcase card styles (`card-aura` / `card-shine` / `card-outline-gradient`)
- **Showcase** — checklist + mini-card grid on a soft glow backdrop
- **Reviews slider** — autoplay, progress bar, prev/next, dots, touch swipe (library `.hero-slider` + one Alpine object)
- **Contact form** in a gradient shell with a success toast
- **Social pills**, footer, and a configurable once-per-visitor "star us" modal
## The stack
| Layer | Tool | Why |
| ----- | ---- | --- |
| Markup & build | [Astro](https://astro.build) | Components, zero JS by default |
| Look | [njX UI](https://njxui.dev) — 44 KB gzip | Ready blocks: cards, gradients, sliders, modals |
| Interactivity | [Alpine.js](https://alpinejs.dev) | Theme switch, slider, form — state lives in the markup |
No Tailwind, no design tokens to configure — `import 'njx-ui/css/style.min.css'`
and you're styling.
## Quick start
```bash
git clone https://github.com/njbSaab/astro-njx-saas my-landing
cd my-landing
npm install
npm run dev
```
Open `http://localhost:4321`, then make it yours:
1. **`src/config.ts`** — name, links, the hero pill snippet, star-popup delay (0 disables it).
2. **Data arrays** in `src/components/{About,Features,Showcase,Reviews}.astro` — metrics, cards, checklist, slides.
3. **Copy** — headings and paragraphs live right in the section components.
## What's inside
```
src/
├── config.ts # brand, links, popup — rebrand in one file
├── layouts/Layout.astro # njX UI import · theme restore · page-wide Alpine state
├── styles/global.css # site chrome: navbar, hero sizing, form shell (~380 lines)
├── components/
│ ├── Nav.astro # sticky header + mobile burger menu
│ ├── Hero.astro # 100dvh hero + copyable CDN pill
│ ├── About.astro # metric cards (data-driven)
│ ├── Features.astro # three showcase card styles (data-driven)
│ ├── Showcase.astro # checklist + mini-card grid (data-driven)
│ ├── Reviews.astro # hero-slider: autoplay · progress · dots · swipe
│ ├── Contact.astro # gradient form shell + success toast
│ ├── Social.astro # social-list-pills
│ ├── StarModal.astro # once-per-visitor modal (lib-modal-*)
│ └── Footer.astro
└── pages/index.astro # assembles the sections
```
## Themes
njX UI ships 9 themes driven by one attribute:
```html
<html data-theme="dark"> <!-- dark · light · red · blue · green · cyan · yellow · pink · purple -->
```
The navbar dots persist the choice to `localStorage`; the layout restores it
before first paint (no flash).
## Deploy
[](https://dash.cloudflare.com/?to=/:account/pages/new)
[](https://app.netlify.com/start/deploy?repository=https://github.com/njbSaab/astro-njx-saas)
Static output — any host works. Build command `npm run build`, output directory `dist`.
## Learn more
- njX UI documentation: https://njxui.dev/documentation (Astro 🚀 and Alpine 🏔 modes)
- Alpine presets for njX components: https://njxui.dev/documentation#njx-alpine
- More ready-made landings: https://njxui.dev/examples
- Classless sibling library: https://classless.njxui.dev
## License
MIT — use it for anything, no attribution required.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客
accessible-astro-starter
Accessible Astro Starter 是一个以无障碍为核心理念的 Astro 6 启动模板,由 incluud 团队维护。
Astro · 博客

astro-erudite
An opinionated, unstyled static blogging template built with Astro and native CSS.
Astro · 作品集

astro-landing-page
An Astro + Tailwind CSS Example/Template for Landing Pages
Astro · 企业官网

astro-shopify
astro-shopify 是一个面向开发者的轻量级电商启动模板,用于构建基于 Shopify 的无头店面。
Astro · 电商

brutal
A neobrutalism Astro starter theme
Astro · 启动器
