← 返回公开榜单
ca

DavidHDev/canvas-ui

A library of creative canvas components. Real HTML with WebGL effects running over it. React, Vue, Svelte, vanilla.

本周新增
37 星
近 3 周倍数
—
距上次推送
35 天
距上次发布
—
许可证
NOASSERTION

星标增长

每根柱子是这个周期记录下来的 star 增长:优先取逐个 stargazer 到达时间分桶的到达数,还没被 stargazer 扫描覆盖的仓库改用该周期的 star 净增;两个写者都没记录的周期画成虚线空档,而不是当成 0。柱高按各自窗口的峰值归一,两张图不共用坐标轴。指向任意一根柱子, tooltip 里是该周期的九项指标:当前值与周期内的净增。

指向或点击一根柱子,看当天的九项指标。

9/209/239/269/2910/110/410/710/10

2026 年 9 月 21 日 新增 11 个星标; 2026 年 9 月 22 日 新增 10 个星标; 2026 年 9 月 23 日 新增 7 个星标; 2026 年 9 月 24 日 新增 6 个星标; 2026 年 9 月 25 日 新增 8 个星标; 2026 年 9 月 26 日 新增 15 个星标; 2026 年 9 月 27 日 新增 5 个星标; 2026 年 9 月 28 日 新增 11 个星标; 2026 年 9 月 29 日 新增 6 个星标; 2026 年 9 月 30 日 新增 4 个星标; 2026 年 10 月 1 日 新增 6 个星标; 2026 年 10 月 2 日 新增 4 个星标; 2026 年 10 月 3 日 新增 3 个星标; 2026 年 10 月 4 日 新增 6 个星标; 2026 年 10 月 5 日 新增 5 个星标; 2026 年 10 月 6 日 新增 4 个星标; 2026 年 10 月 7 日 新增 5 个星标; 2026 年 10 月 8 日 新增 7 个星标; 2026 年 10 月 9 日 新增 6 个星标; 2026 年 10 月 10 日 新增 10 个星标

窗口内最高的一天是 2026 年 9 月 26 日,新增 15 个星标。

证据时间轴

这个项目还没有记录到异动、发布或许可证变化。

README
The document stored for this repository, with its Chinese translation when one has been produced
Canvas UI

An open source library of creative, framework-agnostic components drawn on canvas.
Fluid simulations, shader effects, and 3D scenes that run over your live, fully interactive interface. WebGL or WebGPU via vgpu, your choice.

canvasui.dev · Docs · Components · Playground · Installation · Rendering

GitHub stars CI status 35 components License: MIT + Commons Clause

React Vue Svelte Solid Preact TypeScript

What makes it different

Most components use the experimental HTML-in-canvas API to read and redraw your live DOM. Text stays selectable, links stay clickable, and the page becomes a texture that fire, fluid, and glass distort in real time.

Where it is not supported, components fall back to GPU overlays, so every visitor gets a working page.

🎨35 components and counting: Liquid, Glass, Shatter, Force Field, Decrypt Reveal, and more
🧩Framework agnostic: every component ships for React, Solid, Preact, Vue, Svelte, and vanilla, in both WebGL and WebGPU builds
🖥️Two renderers: WebGL with GLSL, or WebGPU through vgpu with WGSL
📋Copy, do not install: source lands in your repo via a shadcn-compatible registry
⚡Zero config: self-contained, with sensible defaults and typed props
🤖MCP ready: let your AI assistant find and install components for you

Quick start

Add a component with the shadcn CLI (run npx shadcn@latest init first if you have not):

npx shadcn@latest add @canvas-ui/liquid-react

Swap liquid for any component, react for solid, preact, vue, svelte, or vanilla. Source lands in components/canvasui/, yours to edit.

import { Liquid } from "@/components/canvasui/Liquid";

export default function Page() {
  return (
    <Liquid>
      <YourEntirePage />
    </Liquid>
  );
}

Most components wrap your content. The subtree stays live and interactive; the effect runs on top.

See the installation guide for manual setup.

WebGL and WebGPU

Every effect ships in two renderer builds. The WebGL build is the default: raw WebGL2 and GLSL, zero dependencies except three for the object effects. The WebGPU build renders through vgpu with WGSL shaders, keeps the same props and public API, and installs with the -webgpu registry suffix:

npx shadcn@latest add @canvas-ui/liquid-react-webgpu

WebGPU builds ship for all six frameworks. They need a browser with WebGPU, Chrome/Edge 113+, Safari 26+ / iOS 26, or Firefox 141+. If WebGPU is missing, the wrapped content renders unchanged. Details in the rendering guide.

Components

Every component ships for all six frameworks in both renderer builds. Compare them in the playground.

🌊 Fluid & motion
ComponentWhat it doesComponentWhat it does
LiquidPointer-driven fluid simulationRippleWater ripples from every click
ClothFabric rippling in the windDropletsRain running down the screen
BubbleMetaball droplet trailing the cursorDisplacementGrid that ripples away from the cursor
🔥 Fire & energy
ComponentWhat it doesComponentWhat it does
BlazeSparks, smoke, and heat distortionFlame WrapBorder of fire around any element
Force FieldEnergy shield with click shockwavesLaserBeam that reveals content on scroll
💎 Glass & optics
ComponentWhat it doesComponentWhat it does
GlassCrystal-ball lens that follows the cursorFrostIce that melts under the cursor and refreezes
MagnifySci-fi scanner lens with a HUD reticleBendFolds the page like the face of a cube
PeelPeels back to reveal a second layerCloudsMist parted by cursor wind
📼 Retro & glitch
ComponentWhat it doesComponentWhat it does
VHSWorn tape wave, chroma bleed, and grainGlitchBroadcast tearing with RGB splits
Retro DitherDither lens that pixelates the pageAsciifyASCII lens that follows the cursor
Decrypt RevealCipher text decrypting at the cursorGlyph RainFalling glyphs that light up the page
✨ Particles & structure
ComponentWhat it doesComponentWhat it does
Particle RevealParticles merging into crisp UIParticle ScrollSand that reassembles on scroll
Shatter3D glass shards that lift and refractGrid3D tiles rippling around the cursor
Hex FloatFloating hex tiles with cursor liftCanvasWoven canvas you drag wet paint across
🧊 3D effects: no flag needed, these work everywhere

Point these at a GLB/glTF model, SVG, or image to render it as a 3D scene.

ComponentWhat it doesComponentWhat it does
ASCII ObjectRedrawn as shape-matched ASCIIGlass ObjectLiquid glass with real dispersion
Particle ObjectParticles that scatter and spring backDithered ObjectRendered through a 1-bit dither
Liquid ObjectDragged through swirling liquid

Browser support

BrowserHTML-in-canvas components3D effect components
Chrome with the flag or origin trial✅ Full effect✅ Full effect
Everything else⚠️ GPU overlay fallback✅ Full effect

Html-in-canvas needs Chrome with the chrome://flags/#canvas-draw-element flag. An origin trial token lifts that for your visitors. That is how canvasui.dev runs in a plain Chrome install. Details in the docs.

Chrome 150's changes to texElementImage2D() and copyElementImageToTexture() do not require a migration in Canvas UI. The HTML effects capture content with the 2D drawElementImage() API, then upload the canvas with standard texImage2D() (WebGL) or copyExternalImageToTexture() (WebGPU). Those upload methods keep their existing signatures. This also applies to the generated registry components for all six frameworks.

The later HTML-in-Canvas changes also affect capture markup and hit testing. Canvas UI synchronizes the captured element's geometry when the browser requires it, keeping scrolling, clicks, and cursor effects working in Chrome 154. It also selects content="drawable" and drawable when the newer API is available, while preserving support for layoutsubtree and automatic 2D geometry synchronization.

Both renderers follow pinch zoom through visualViewport, increasing capture and rendering resolution while preserving the HTML's position and interactions. The normal 2× device-pixel-ratio budget is multiplied by the zoom scale, subject to GPU limits, an 8192-pixel maximum dimension, and a 16-megapixel buffer budget. Particle Scroll uses plain HTML without a GPU overlay when HTML-in-Canvas is unavailable, including in Safari.

Use with AI

The registry is MCP ready, so your assistant can browse and install components:

npx shadcn@latest mcp init --client claude

Works with Claude Code, Cursor, VS Code, Codex, and OpenCode. Then just ask: "add the Liquid component from Canvas UI".

Development

This repo holds the library source, the docs site (Next.js 16, Tailwind v4, on Cloudflare Workers), and the registry build.

npm install
npm run dev        # builds the registry, then starts next dev
npm run build      # production build
npm run deploy     # build and deploy to Cloudflare
PathWhat lives here
src/lib/<Component>/WebGL and WebGPU engines plus framework wrappers
src/demos/Interactive demo and controls for each component
src/app/Documentation site routes
scripts/build-registry.mtsGenerates public/r/*.json for the shadcn CLI

Each component is plain TypeScript with thin framework wrappers. WebGL builds use raw WebGL2 and GLSL. WebGPU builds use vgpu and WGSL. Nothing depends on another Canvas UI component, and each engine defines its own props.

Contributing

Issues and pull requests welcome. See CONTRIBUTING.md.

License

MIT + Commons Clause. Free in your own projects, commercial or not. The Commons Clause only restricts selling the library itself.

页面上的每个数字都来自记录下来的 stargazer 到达时间,没有评分公式,也没有 AI 判定。 任何结论都可以用 /api/v1/repos/{id}/stats 里的原始增量自己重算。