ViteReactHTML启动器

html-visual-builder — Vite 启动器模板

作者 reyad-dev

基于 React、TypeScript 与 GrapesJS 的可视化网页构建器,支持拖拽布局、多设备预览、CSS 属性检查,并导出独立 HTML5 或通过浏览器打印生成 PDF,内置阿拉伯语字体与 RTL/LTR 支持。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-16查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 GrapesJS 的拖拽式可视化画布,支持区块、容器、多列网格、文字、按钮、媒体和分隔线等元素

02

CSS 检查器覆盖 Display、Flexbox、Grid、排版、颜色、内外边距、尺寸、边框和投影等属性

03

支持桌面、平板(768px)和移动(375px)三种视口的一键响应式预览

04

可导出独立 HTML5 文件,或通过浏览器打印对话框输出 PDF

05

内置 Alexandria、Cairo、Tajawal 等阿拉伯语字体,并支持 RTL/LTR 双向文本

06

使用 IndexedDB 与 LocalStorage 持久化项目,支持自动恢复、复制、重命名和删除

模板详细介绍

HTML Visual Builder 是一个可视化网页构建器,面向开发者、设计师和营销人员。它使用 GrapesJS 作为可视化编辑引擎,配合 React 与 TypeScript 构建界面,通过拖拽方式在画布上添加区块、容器、多列网格、文字、按钮、媒体和分隔线等元素,并实时显示吸附与放置反馈。编辑器提供 CSS 检查器,可调整 Display、Flexbox、Grid、排版、颜色、内外边距、尺寸、边框和投影等属性;支持在桌面、平板(768px)和移动(375px)视口之间切换预览。

项目内置 SaaS 产品落地页、个人作品集、企业机构展示和基础画布等预置模板,并提供 Alexandria、Cairo、Tajawal 等阿拉伯语字体以及 Inter、JetBrains Mono,支持双向文本(RTL/LTR)。导出方面,可生成带作用域 CSS 的独立 HTML5 文件,也可通过浏览器打印对话框(Ctrl+P)配合 @media print 规则输出 PDF。

持久化使用 IndexedDB 和 LocalStorage,支持自动恢复状态、项目复制/重命名/删除以及未保存状态跟踪;安全方面使用 DOMPurify 进行 XSS 清理,并包含 CSS AST 解析、外部远程资源检测和 iframe 隔离。README 未提供关于性能指标、具体浏览器兼容范围或生产部署流程的说明。

ViteReactHTML启动器

适合你的项目吗?

适用场景

  • 快速搭建响应式落地页、作品集或企业展示页面并导出独立 HTML
  • 需要阿拉伯语排版和 RTL/LTR 双向文本支持的网页设计
  • 通过拖拽和 CSS 检查器进行页面布局与样式调整的可视化编辑
  • 将设计稿通过浏览器打印功能输出为 PDF 文档

适合人群

  • 需要可视化编辑并导出 HTML 的前端开发者
  • 进行网页布局与样式设计的设计师
  • 制作阿拉伯语或双语网页的营销与内容人员

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 Node.js v18.0.0 或更高版本,以及 npm、yarn 或 pnpm。

  2. 2

    克隆仓库后执行 npm install 安装依赖,再运行 npm run dev 启动本地开发服务器,默认地址为 http://localhost:5173。

  3. 3

    npm run build 用于编译 TypeScript 并生成生产构建,npm test 运行 Vitest 测试,npm run typecheck 和 npm run lint 分别执行类型检查与 ESLint 校验。

  4. 4

    README 未提供生产部署步骤或托管环境要求。

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-16。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 85 / 100
技术栈
Vite · React · HTML
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-10-16
截图检查日期
2026-10-16

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Vite。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16

查看当时使用的来源资料

SHA-256: 709291a7ef5f3f3a753c3723aca7085b0bc6ae2ca9cd2957375309163fd788cf

2026-10-16T03:49:24.059Z

来源文件 / 仓库
# 🚀 HTML Visual Builder — Next-Gen Drag & Drop Web Page Builder
### محرر صفحات الويب المرئي بالسحب والإفلات وتصدير HTML & PDF احترافي

[![Live Demo](https://img.shields.io/badge/Live_Demo-Try_Online-0ea5e9?style=for-the-badge&logo=googlechrome&logoColor=white)](https://reyad-dev.github.io/html-visual-builder/)
[![Build Status](https://img.shields.io/badge/Build-Passing-10b981?style=for-the-badge&logo=github-actions)](https://github.com/reyad-dev/html-visual-builder)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-3178c6?style=for-the-badge&logo=typescript)](https://www.typescriptlang.org/)
[![React](https://img.shields.io/badge/React-19.3-06b6d4?style=for-the-badge&logo=react)](https://react.dev/)
[![GrapesJS](https://img.shields.io/badge/GrapesJS-0.23-6366f1?style=for-the-badge)](https://grapesjs.com/)
[![Vite](https://img.shields.io/badge/Vite-6.3-9333ea?style=for-the-badge&logo=vite)](https://vitejs.dev/)
[![Tests](https://img.shields.io/badge/Vitest-133%20Passed-10b981?style=for-the-badge&logo=vitest)](https://vitest.dev/)
[![License](https://img.shields.io/badge/License-MIT-blue?style=for-the-badge)](LICENSE)

> 🌐 **Live Demo (جرّب المحرر أونلاين فوراً):**  
> **[https://reyad-dev.github.io/html-visual-builder/](https://reyad-dev.github.io/html-visual-builder/)**

> **HTML Visual Builder** is an enterprise-grade, high-fidelity visual web page builder designed for developers, designers, and marketers. Build modern responsive layouts with drag-and-drop ease, inspect and style CSS properties with millimeter precision, preview across multiple device viewports, and export clean, standalone HTML5 documents or vector-grade PDFs with first-class Arabic typography support.

---

## 🌟 Highlights & Key Features | أبرز المميزات

- 🎯 **Intuitive Drag & Drop Canvas (محرر سحب وإفلات مرئي):**
  Drag sections, containers, multi-column grids, typography, buttons, media, and dividers directly onto the visual artboard with realtime snap and drop feedback.

- 🖨️ **Print & Export to PDF (طباعة وتصدير عالي الدقة كـ PDF):**
  Export your designs directly to standalone vector PDF documents using native `@media print` rules and browser print dialogs (`Ctrl + P`), preserving exact layout fidelity, background colors, and web fonts.

- 🌐 **First-Class Arabic Typography (دعم الخطوط العربية الحديثة):**
  Native integration of Google Fonts: **Alexandria**, **Cairo**, and **Tajawal** alongside Inter and JetBrains Mono. Built-in bi-directional (RTL/LTR) support ensures Arabic text renders with supreme typographic beauty.

- ⚡ **Zero-Dependency Standalone Export (تصدير كود HTML5 & CSS نظيف ومستقل):**
  Generate deterministic, production-ready HTML5 files with scoped CSS. Completely self-contained, offline-compatible, and free of vendor lock-in.

- ✨ **Pre-built Starter Templates Gallery (مكتبة قوالب وأمثلة جاهزة):**
  Instant access to curated, responsive templates including SaaS Landing Pages, Personal Portfolios, Business & Agency Showcases, and starter canvas examples.

- 📱 **Multi-Device Responsive Previews (معاينة متعددة الأجهزة):**
  One-click responsive toggles between **Desktop**, **Tablet (768px)**, and **Mobile (375px)** viewports with synchronized canvas scaling.

- 🎛️ **Comprehensive CSS Inspector (مفتش الخصائص والأنماط):**
  Visual controls for Display, Flexbox, Grid, Typography, Colors, Spacing (Margin & Padding), Dimensions, Borders, and Drop Shadows.

- 💾 **Local Offline Persistence (حفظ تلقائي وإدارة المشاريع):**
  IndexedDB and LocalStorage persistence engine with automatic state restoration, project duplicate/rename/delete capabilities, and dirty state tracking.

- 🛡️ **Enterprise-Grade Security & Sanitization (أمان وحماية متقدمة):**
  Strict XSS sanitization powered by DOMPurify, CSS AST parsing, external remote resource detection, and safe iframe isolation.

---

## 📂 Pre-built Example Templates | القوالب الجاهزة

| Template | Category | Description | Arabic Title |
| :--- | :--- | :--- | :--- |
| **SaaS Product Landing** | `Landing Page` | Modern conversion-focused landing page with hero, 3-column features grid, and CTA | صفحة هبوط تطبيق ومنتجات رقمية |
| **Personal Portfolio & Bio** | `Portfolio` | Clean personal website showcase featuring bio, skills pills, project cards, and social links | معرض أعمال وسيرة ذاتية شخصية |
| **Business Agency Showcase** | `Business` | High-impact corporate agency layout with metrics counters and contact sections | صفحة شركة وخدمات أعمال |
| **Starter Visual Canvas** | `Starter` | Clean centered starter layout with section, heading, button, and responsive columns | المثال الأساسي المنسق |

---

## 🛠️ Tech Stack & Architecture | البنية التقنية

- **Core Framework:** [React 19](https://react.dev/) + [TypeScript 5.9](https://www.typescriptlang.org/)
- **Visual Builder Engine:** [GrapesJS Core 0.23](https://grapesjs.com/) (Headless adapter pattern)
- **State Management:** [Zustand 5](https://github.com/pmndrs/zustand)
- **Security & Sanitization:** [DOMPurify 3.4](https://github.com/cure53/DOMPurify)
- **Build Tool:** [Vite 6](https://vitejs.dev/)
- **Testing Suite:** [Vitest 5](https://vitest.dev/) (133 unit & integration tests)
- **Typography:** Alexandria, Cairo, Tajawal, Inter, JetBrains Mono

---

## 🚀 Quick Start | البدء السريع

### Prerequisites
- [Node.js](https://nodejs.org/) (v18.0.0 or higher)
- npm or yarn or pnpm

### Installation

```bash
# Clone the repository
git clone https://github.com/reyad-dev/html-visual-builder.git

# Navigate into the project directory
cd html-visual-builder

# Install dependencies
npm install

# Start local development server
npm run dev
```

Open your browser at `http://localhost:5173` to start designing!

---

## ⌨️ Keyboard Shortcuts | اختصارات لوحة المفاتيح

| Shortcut | Action | Description |
| :--- | :--- | :--- |
| `Ctrl + S` / `Cmd + S` | **Save Project** | Saves current canvas state to browser storage |
| `Ctrl + P` / `Cmd + P` | **Print / Export PDF** | Opens print dialog to print or save vector PDF |
| `Ctrl + Z` / `Cmd + Z` | **Undo** | Reverts the last editor action |
| `Ctrl + Shift + Z` / `Ctrl + Y` | **Redo** | Re-applies the previously undone action |
| `Ctrl + D` / `Cmd + D` | **Duplicate** | Duplicates currently selected element |
| `Delete` / `Backspace` | **Delete Element** | Removes currently selected element from canvas |

---

## 🧪 Testing & Verification | الاختبارات والتحقق

The project maintains 100% test pass rate across 18 test suites covering core editor logic, DOM sanitization, export generators, persistence, and UI components.

```bash
# Run unit and integration tests
npm test

# Run tests in watch mode
npm run test:watch

# Run TypeScript typecheck
npm run typecheck

# Run ESLint validation
npm run lint
```

---

## 📦 Project Scripts | أوامر المشروع

- `npm run dev` — Launches Vite local dev server with HMR.
- `npm run build` — Compiles TypeScript and creates optimized production bundle.
- `npm run test` — Executes all Vitest suites.
- `npm run typecheck` — Typechecks codebase with strict TypeScript compiler.
- `npm run lint` — Lints project files with ESLint.
- `npm run format` — Formats codebase using Prettier.

---

## 👤 Author & Maintainer | المطور

**Mohamed Reyad** — Full Stack Web Developer & UI/UX Architect  
- **GitHub:** [@reyad-dev](https://github.com/reyad-dev)  
- **Role:** Web Design, Automation & Architecture  

---

## 📄 License | الترخيص

This project is open-source and licensed under the [MIT License](LICENSE).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。