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.

ยท ยท ยท ยท ยท

License: MIT + Commons Clause
[blocked]

React
Vue
Svelte
Solid
Preact
TypeScript

What makes it different

Most components use the experimental 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):

bash
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.

tsx
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 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 with WGSL shaders, keeps the same props and public API, and installs with the -webgpu registry suffix:

bash
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 .

Components

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

๐ŸŒŠ Fluid & motion
ComponentWhat it doesComponentWhat it does
Pointer-driven fluid simulationWater ripples from every click
Fabric rippling in the windRain running down the screen
Metaball droplet trailing the cursorGrid that ripples away from the cursor
๐Ÿ”ฅ Fire & energy
ComponentWhat it doesComponentWhat it does
Sparks, smoke, and heat distortionBorder of fire around any element
Energy shield with click shockwavesBeam that reveals content on scroll
๐Ÿ’Ž Glass & optics
ComponentWhat it doesComponentWhat it does
Crystal-ball lens that follows the cursorIce that melts under the cursor and refreezes
Sci-fi scanner lens with a HUD reticleFolds the page like the face of a cube
Peels back to reveal a second layerMist parted by cursor wind
๐Ÿ“ผ Retro & glitch
ComponentWhat it doesComponentWhat it does
Worn tape wave, chroma bleed, and grainBroadcast tearing with RGB splits
Dither lens that pixelates the pageASCII lens that follows the cursor
Cipher text decrypting at the cursorFalling glyphs that light up the page
โœจ Particles & structure
ComponentWhat it doesComponentWhat it does
Particles merging into crisp UISand that reassembles on scroll
3D glass shards that lift and refract3D tiles rippling around the cursor
Floating hex tiles with cursor liftWoven 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
Redrawn as shape-matched ASCIILiquid glass with real dispersion
Particles that scatter and spring backRendered through a 1-bit dither
Dragged through swirling liquid

Browser support

BrowserHTML-in-canvas components3D effect components
Chrome with the โœ… 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 token lifts that for your visitors. That is how canvasui.dev runs in a plain Chrome install. Details in the .

Use with AI

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

bash
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.

bash
npm installnpm run dev        # builds the registry, then starts next devnpm run build      # production buildnpm 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 [blocked].

License

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


Built by ยท