Liquid Fill Headline
motiq/liquid-fill-headlineFreeComponent
An outlined wordmark that fills bottom-up with a sloshing two-polygon clip-path wave rebuilt per frame, settles as the amplitude decays, then takes a coral shimmer sweep. Pure CSS-clipped text (never an SVG luminance mask), controllable level, reduced-motion safe.
Live preview
live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.motiq.dev/r/liquid-fill-headline.jsonSource
1"use client";23import * as React from "react";45import { cn } from "@/lib/utils";6import { useReducedMotion, useVisibilityPause } from "@/lib/motiq";78/* -------------------------------------------------------------------------- */9/* Types */10/* -------------------------------------------------------------------------- */1112/** `inview` runs the pour timeline on screen; `manual` waits for `level`/replay. */13export type LiquidFillTrigger = "inview" | "manual";1415export interface LiquidFillHeadlineProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {16 /** The real string. Rendered readable on the server and to screen readers. */17 text: string;18 /** Rise duration in ms. */19 fillMs?: number;20 /** How long the full headline is held before draining, in ms. */21 holdMs?: number;22 /** Drain duration in ms. */23 drainMs?: number;24 /** Wave height at full slosh, in % of the headline box. */25 amplitude?: number;26 /** Two or more CSS colors for the liquid gradient (top → bottom). */27 gradient?: string[];28 /** The coral shimmer sweep at the moment the headline fills. */29 shimmer?: boolean;30 /** Keep pouring / draining on a loop. */31 loop?: boolean;32 /** Controlled fill level, 0–1. Setting it takes the timeline out of the picture. */33 level?: number;34 /** What starts the pour. */35 trigger?: LiquidFillTrigger;36 /** Restart the pour on pointer down anywhere on the headline. */37 replayOnPointer?: boolean;38 /** Element tag for the rendered headline. */39 as?: "h1" | "h2" | "h3" | "p" | "span" | "div";40 /** Force the static variant: a fully filled gradient headline, no motion. */41 reducedMotion?: boolean;42 /** Fires each time the headline reaches full. */43 onFilled?: () => void;44}4546/* -------------------------------------------------------------------------- */47/* Constants */48/* -------------------------------------------------------------------------- */4950/** Polygon resolution — 24 points is smooth at headline scale and cheap. */51const POINTS = 24;52/** Timeline segments not exposed as props (seconds). */53const SETTLE_S = 0.8;54const SHIMMER_S = 1.0;55const GAP_S = 0.8;56/** Level (% of the box) at empty and at full — full overshoots the cap slightly. */57const LEVEL_EMPTY = 108;58const LEVEL_FULL = -6;59/** The back layer rides higher and out of phase, which reads as depth. */60// … truncated
What it pulls in
Other registry items
Files it writes
More from motiq
All 100 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Activity Streamactivity-stream | motiq | Components | Free | 1 dep | |
| Adaptive Safe-Zone Gridadaptive-safe-zone-grid | motiq | Components | Free | no deps | |
| Agent Run Timelineagent-run-timeline | motiq | Components | Free | 1 dep | |
| AI Response Streamai-response-stream | motiq | Components | Free | 1 dep | |
| Animated Accordionanimated-accordion | motiq | Components | Free | 2 deps | |
| Animated Buttonanimated-button | motiq | Components | Free | 1 dep | |
| Animated Dialoganimated-dialog | motiq | Components | Free | 2 deps | |
| Animated Gridanimated-grid | motiq | Components | Free | 2 deps |
