Liquid Charge Capsule

A glass capsule with a two-layer sloshing liquid that rises to the charge level. Colour warms from ember red to calm emerald as it fills, bubbles rise and pop while charging, a brushed-metal bolt floats in the glass and a soft pulse celebrates a full charge.

Try it: Watch Auto charge and drain — or drag the capsule / use arrow keys to set the level.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/liquid-charge-capsule.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/liquid-charge-capsule. You can also copy the source into components/ui/liquid-charge-capsule.tsx (view on GitHub).

Usage

import { LiquidChargeCapsule } from '@/components/ui/liquid-charge-capsule'

Props

Component props
PropTypeDefaultNotes
levelnumber64Charge 0–100; the liquid springs to it and sloshes.
chargingbooleanfalseBubbles, stirring surface and the floating bolt.
heightnumber232Capsule height in px (width follows).
lowThresholdnumber20At or below: red liquid and a low-battery status.
showReadoutbooleantrueCounting percentage and status line.
onLevelChange(level: number) => void—Turns it into a vertical slider (drag, arrows, Home/End).
onFull() => void—Fires when it reaches 100 while charging (with a celebration pulse).
labelstring'Battery'Accessible name; exposed as a meter (or slider).

Dependencies

  • motion
  • Ghost Gobbler Skull

    A glossy vinyl-toy skull that tracks little black-smoke ghosts drifting in from every direction, drops its jaw, slurps each one in like spaghetti and CHOMPS — then levels up: glowing eyes, blush…

  • Morph Glyph Loader

    Glyph morphs through abstract SVG shapes.

  • Particle Morph Loader

    A depth-lit swarm of motes spins in 3D and melts between sphere, ribbon, shell, tetra, ring and helix while a status word rolls underneath.

  • Ink Drip Loader

    Ink drops merge into a looping puddle.

  • Lattice Pulse Loader

    3×3 nodes pulse in a traveling wave.

  • Orbital Bead Loader

    Beads orbit a core; hover speeds up.

See all 11 Loading components