Black Friday: 30% off Pro

Get 30% off

Updated

Viscosity Menu

Pro

Preview

Customize

Speed1.00
Goo blur8.0
Goo contrast28
Lead move stiffness420
Lead move damping36.0
Lead size stiffness280
Lead size damping28.0
Trail move stiffness260
Trail move damping30.0
Trail size stiffness200
Trail size damping26.0
Stretch lead0.22
Stretch trail0.18
Stretch max0.20
Squish0.40
Sway0
Text delay0.20s
Text duration0.30s
Text blur6.0px
Text scale0.85

Installation

Pro

Viscosity Menu is a Pro component

Sign in to see the source, or install it with a license key. The live preview and props above are free to explore.

Install with a key

  1. Add the Pro registry to components.json:
    components.json
    {
      "registries": {
        "@uibrik-pro": {
          "url": "https://uibrik.com/r/pro/{name}.json",
          "headers": { "Authorization": "Bearer ${UIBRIK_LICENSE}" }
        }
      }
    }
  2. Put your key in .env.local and add that file to .gitignore:
    .env.local
    UIBRIK_LICENSE=your-license-key
  3. Install it:
    Terminal
    npx shadcn@latest add @uibrik-pro/viscosity-menu

Usage

import { ViscosityMenu } from "@/components/uibrik/viscosity-menu/viscosity-menu";​<ViscosityMenu  speed={1}  gooBlur={8}  gooContrast={28}  leadMoveStiffness={420}  leadMoveDamping={36}  leadSizeStiffness={280}  leadSizeDamping={28}  trailMoveStiffness={260}  trailMoveDamping={30}  trailSizeStiffness={200}  trailSizeDamping={26}  stretchLead={0.22}  stretchTrail={0.18}  stretchMax={0.2}  clipText  squish={0.4}  sway={0}  textDelay={0.2}  textDuration={0.3}  textBlur={6}  textScale={0.85}/>

Where to use Viscosity Menu

  • Creative navigation

    A dot pouring into a menu panel gives a portfolio a liquid feel.

    Pairs with Ferrofluid Menu

  • Floating menus

    A small dot that expands keeps the page clean.

  • Mobile menus

    Liquid motion makes opening a menu playful.

    Pairs with Hamburger Sheet

Props

ViscosityMenu
speed
Type number
1
Playback rate of the whole liquid animation; 1 is real time.
gooBlur
Type number
8
How far the two blobs blur into each other before thresholding. Higher melts them together over a longer neck.
gooContrast
Type number
28
Sharpness of the liquid edge after the blur. Lower is softer and more see-through at the rim.
leadMoveStiffness
Type number
420
How hard the leading blob is pulled toward its target position.
leadMoveDamping
Type number
36
Friction on the leading blob's movement. Lower overshoots and wobbles.
leadSizeStiffness
Type number
280
How quickly the leading blob grows from the dot into the panel (and shrinks back).
leadSizeDamping
Type number
28
Friction on the leading blob's resize. Lower lets the size bounce.
trailMoveStiffness
Type number
260
Pull on the trailing blob. Keep it below the lead so it lags and stretches a neck.
trailMoveDamping
Type number
30
Friction on the trailing blob's movement.
trailSizeStiffness
Type number
200
How quickly the trailing blob changes size.
trailSizeDamping
Type number
26
Friction on the trailing blob's resize.
stretchLead
Type number
0.22
How much the leading blob elongates with its speed, keeping its area.
stretchTrail
Type number
0.18
How much the trailing blob elongates with its speed.
stretchMax
Type number
0.2
Cap on the speed stretch, so a fast move never becomes a thin streak.
clipText
Type boolean
true
Reveal the options only where the liquid has reached, instead of over the whole panel.
squish
Type number
0.4
How narrow the drop gets halfway between the dot and the panel.
sway
Type number
0
Sideways kick when opening or closing, for a swinging pour. 0 drops straight.
textDelay
Type number
0.2
Wait after opening before the options fade in.
textDuration
Type number
0.3
How long the options take to fade in.
textBlur
Type number
6
Blur the options start from as they fade in.
textScale
Type number
0.85
Scale the options start from as they fade in.