explaingit

zanwei/liquid-connector-web-component

Analysis updated 2026-05-18

73JavaScriptAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A dependency-free web component that recreates a liquid card-to-prompt animation using real SVG path math instead of filters or shaders.

Mindmap

mindmap
  root((Liquid Connector))
    What it does
      Liquid card to prompt animation
      Real SVG path math
      No filters or shaders
    Tech stack
      JavaScript
      Web Components
      SVG
      Shadow DOM
    Use cases
      Morphing UI interactions
      Frame by frame animation control
      Custom styled prompt cards
    Audience
      Frontend developers
      UI designers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a liquid morphing card-to-prompt interaction to a web app

USE CASE 2

Recreate a specific motion-design reference without canvas or shader tricks

USE CASE 3

Control the peel animation programmatically, frame by frame

USE CASE 4

Style the connector via CSS custom properties and shadow parts

What is it built with?

JavaScriptWeb ComponentsSVGShadow DOM

How does it compare?

zanwei/liquid-connector-web-componentopenclaw/docstrueugenee/ai-linux-webapp-wrapper
Stars737472
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-07-09
MaintenanceActive
Setup difficultyeasyhardeasy
Complexity3/54/52/5
Audiencedeveloperops devopsvibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a modern browser with Custom Elements, Shadow DOM, and SVG foreignObject support.

Free to use, modify, and redistribute under the MIT license, though the Notion name and mark shown in the demo are not covered by that license.

In plain English

Liquid Connector is a small, dependency-free web component that recreates a liquid-like animation where a card visually connects to and detaches from a prompt input, similar to a well-known motion design seen online. The white shape that morphs between states is drawn as a real, calculated SVG path rather than faked with filters, masks, canvas tricks, bitmap effects, or shaders, so the seams, corners, waist, and peeling motion all come from actual path math. The component is meant to be lightweight and used entirely in the browser. It bundles the custom HTML element itself, the underlying path solver that calculates the shape, a way to step through the animation frame by frame for precise control, support for users who prefer reduced motion, and an optional overlay for visually inspecting the geometry while building with it. Key features include continuous path geometry as the shape overlaps, couples, peels apart, and separates, a fixed card size while peeling, independent strain on the input text and the send button as the interaction collapses, direction-aware merging and detaching, encapsulated styling through the Shadow DOM with a handful of customizable colors, and full keyboard and focus support. The project is an independent recreation inspired by a motion design shared publicly by another designer, and the author is careful to note that no original source code or media from that reference is included, and that the project has no affiliation with that designer, X, or Notion, whose name appears only as example content in the demo. Once published, it installs through npm, or it can be loaded directly as plain script tags without any build tool. After adding the element to a page, developers can configure it through HTML attributes such as labels and spacing, or control it through a small JavaScript API that lets them open or close it, change its gap, set the prompt text, adjust the physics-like peel parameters, or advance the animation manually. It also fires standard DOM events for actions like connecting, skipping, and submitting a prompt.

Copy-paste prompts

Prompt 1
Help me install liquid-connector-web-component with npm and add it to my page.
Prompt 2
Explain how to use the JavaScript API to open, close, and set the gap on the liquid connector.
Prompt 3
Walk me through customizing the connector's colors and labels with attributes and CSS parts.
Prompt 4
Show me how to step through the peel animation manually using the step method for precise control.

Frequently asked questions

What is liquid-connector-web-component?

A dependency-free web component that recreates a liquid card-to-prompt animation using real SVG path math instead of filters or shaders.

What language is liquid-connector-web-component written in?

Mainly JavaScript. The stack also includes JavaScript, Web Components, SVG.

What license does liquid-connector-web-component use?

Free to use, modify, and redistribute under the MIT license, though the Notion name and mark shown in the demo are not covered by that license.

How hard is liquid-connector-web-component to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is liquid-connector-web-component for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.