Search for a command to run...
Lightweight JavaScript library for building interactive UIs with a React-compatible API. Provides virtual DOM rendering, hooks, and functional components in about 3KB gzipped, roughly an order of magnitude smaller than React plus ReactDOM.
Adopted for mobile-first apps, embedded widgets, and performance-critical pages where bundle size and parse time matter. Preact differentiates from React by using native browser events instead of a synthetic event system, and ships a compatibility layer, preact/compat, so most React ecosystem libraries and tooling work with minimal changes. Teams often swap React for Preact in existing projects to cut payload and improve load performance on slow networks.
Key capabilities:
Teams use Preact for mobile-first SPAs, embedded dashboards and widgets, performance-sensitive landing pages, and projects where every kilobyte affects Core Web Vitals. Developers can migrate existing React codebases with minimal changes via compat, or start fresh and benefit from a smaller runtime and faster cold starts. Works with standard React build tooling including Vite, webpack, and Babel.