Skip to content

Liquid Glass Pill

3d

A glass capsule floating in a soft blue studio that stretches toward the cursor like a droplet, thins as it reaches, and squashes when pressed.

glassliquidcapsuletransmissionuiinteractivehero
Live previewthreejs renderer
loading webgl…

This is a Pro design

Unlock the full source, playground and exports.

Upgrade to unlock
source/liquid-glass-pilllive mode

How it works

3 steps
01

Preview

See the authored component running live.

02

Customize

Open the playground to tune its controls.

03

Ship

Copy the TypeScript source and install what it needs.

Runtime package

Install the requirements

verified from renderer

These are the real runtime dependencies declared for this renderer. The product itself is not presented as a package until a published package exists.

npm install three^0.185.1 @react-three/fiber^9.7.0

Product contract

Renderer
threejs
Version
Not published
Preview
live
Controls
0 authored controls
Source
liquid-glass-pill

Usage

Use the authored product, not a screenshot

This product is rendered as a live Three.js scene. The preview and exported source are driven by the same repository definition and renderer contract.

Stored product brief

A liquid glass pill: a real capsule mesh rendered with a physical transmission material so it refracts the fuzzy blue spheres behind it. The liquid behaviour is a vertex deformation that stretches the capsule along the direction of the cursor, thins the neck as it stretches, and ripples with the spring velocity. A DOM overlay carrying an icon, a label and a stop button is projected onto the pill every frame so the text stays crisp.

Source integrity

Traceable back to the registry

Registry source

liquid-glass-pill

Public slug

liquid-glass-pill

Renderer

threejs

Published version

Not published

Playground

Code, API, and integration

liquid-glass-pill.tsxTypeScript
import { Canvas, useFrame } from "@react-three/fiber";
import { useRef } from "react";
import type { Group } from "three";

// Liquid Glass Pill — SceneUI 3D export (React Three Fiber)
function Rig({ children }: { children: React.ReactNode }) {
  const ref = useRef<Group>(null);
  useFrame((_, delta) => {
    if (ref.current) ref.current.rotation.y += delta * 0.45 * 1;
  });
  return <group ref={ref} scale={1.000}>{children}</group>;
}

export function LiquidGlassPill() {
  return (
    <Canvas dpr={[1, 1.5]} camera={{ position: [0, 0, 4], fov: 45 }} style={{ background: "#4a6d9c" }}>
      <ambientLight intensity={0.35} />
      <pointLight position={[3, 3, 3]} intensity={7.8} color="#7399c4" />
      <pointLight position={[-3, -2, -2]} intensity={4.4} color="#2d4a82" />
      <Rig>
        {/* Paste the matching JSX for this design from the playground renderer,
            or open it in the editor and copy the live scene. */}
      </Rig>
    </Canvas>
  );
}

Related

Nearby in the library

More 3d →