
Threat Research
/Security News
Searchjacked: Hidden Browser Extensions Hijack Searches for 13 Million Users
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.
Convert HTML pages to React/Vue components with batch processing, component splitting, and live preview server
h2ui is a high-efficiency CLI tool that converts static HTML pages into modular, reusable React (TSX/JSX) or Vue 3 (SFC) component trees using pure rule-based analysis.
Powered by AST parsing + semantic analysis, it automatically splits flat HTML into a sensible component hierarchy, extracts and deduplicates CSS styles, and provides a hot-reloading browser preview server out-of-the-box.
Chinese Documentation: README_zh.md
In the workflow of Idea (Text) ➔ Design (HTML) ➔ Development (React/Vue):
h2ui serves as the bridging compiler. It takes a single high-fidelity HTML design and compiles it deterministically into production-ready components with clean CSS Modules, ensuring 100% rendering fidelity without the risks of pure-AI code generation.
header, nav, main, footer, and repeated list items), builds a nested component hierarchy, and writes separate component files.<template>, <script setup>, <style scoped>)..module.css for each component by default and binds className, providing absolute style encapsulation.shared.module.css, inherited via CSS Modules composes rule.<style> tags to a standard global.css and imports it in the root component.<style scoped> blocks with component-specific CSS.<head> link tags and restores them in the preview environment.Install globally via npm:
npm install -g h2ui-cli
Or run directly without installation using npx:
npx h2ui-cli convert <path-to-html-file>
For local development setup, install dependencies and build:
npm install
npm run build
[!NOTE] If installed globally or running via
npx, use the executable commandh2ui. If you are developing locally, replaceh2uiwithnode dist/bin/h2ui.js.
init)Generates a .h2uirc configuration file to define your default preferences.
h2ui init [--force]
Scaffold config template (.h2uirc):
{
"_comment": "h2ui configuration file.",
"out": "./h2ui_output/",
"typescript": true,
"strict": false,
"split": true,
"cssMode": "module"
}
Configuration options explained:
| Option | Type | Default | Description |
|---|---|---|---|
out | string | ./h2ui_output/ | Output directory for generated components |
typescript | boolean | true | Generate .tsx files (false for .jsx) |
strict | boolean | false | Treat all warnings as errors, halt execution |
split | boolean | true | Split HTML into component tree (false = single file) |
cssMode | string | module | CSS output mode: module, scoped, inline, global |
framework | string | react | Target framework: react or vue3 |
convert)Converts a static HTML file to React TSX/JSX or Vue 3 SFC components:
h2ui convert <path-to-html-file> [options]
Available Options:
--out <directory>: Output directory for the generated components (default: ./h2ui_output/).--type <tsx|jsx>: Output file extension, either tsx or jsx (default: tsx). Only applies to React output.--framework <react|vue3>: Target framework (default: react).--no-split: Disable component splitting and generate a single large component file.--strict: Strict mode; treats all warnings as errors and halts execution.Examples:
# Convert to React TSX
h2ui convert input.html --out ./components
# Convert to Vue 3 SFC
h2ui convert input.html --framework vue3 --out ./components
# Convert as single JSX file without splitting
h2ui convert page.html --type jsx --no-split
batch)Convert multiple HTML files using glob patterns:
h2ui batch "<glob-pattern>" [options]
Available Options:
--out <directory>: Output directory (default: ./h2ui_output/).--concurrency <number>: Number of files to process in parallel (default: 1, max: 4).--no-split: Disable component splitting.--strict: Promote all warnings to errors.Examples:
# Convert all HTML files in a directory
h2ui batch "src/**/*.html"
# Convert with 4-way parallelism
h2ui batch "pages/*.html" --out ./components --concurrency 4
preview)Starts the local Vite-powered preview server with live reload:
h2ui preview [options]
Available Options:
-o, --out <dir>: Output directory to watch and sync (default: ./h2ui_output).-p, --port <port>: Port to run the preview server on (default: 5173).Example:
h2ui preview --out ./components --port 3000
Open http://localhost:3000 in your browser to view your converted component tree live.
To ensure production-ready code quality, h2ui outputs styling under the following specifications:
<style> tags are written to global.css and imported globally in the root component:
import './global.css';
<head> are dynamically injected into the head of the preview index.html..shared in shared.module.css and composed in component-level CSS Module files:
.featureCard {
composes: shared from './shared.module.css';
/* component-specific non-shared styles */
background: blue;
}
<style scoped> block with component-specific CSS, ensuring style isolation without CSS Modules.To run the Vitest unit tests:
npm test
FAQs
Convert HTML pages to React/Vue components with batch processing, component splitting, and live preview server
The npm package h2ui-cli receives a total of 2 weekly downloads. As such, h2ui-cli popularity was classified as not popular.
We found that h2ui-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.

Product
Socket Threat Intel now shows which malware campaigns were blocked or detected in your organization, with links to scans and Firewall events.