terra vidhal

Liquid Button

Component

About

A button whose background fills with liquid from the bottom on hover or keyboard focus.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Liquid Button to your project and fits it to your theme.

Code

How Liquid Button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import { ArrowRight, Download, Heart } from "lucide-react";
import { LiquidButton } from "@/components/ui/liquid-button";

export default function LiquidButtonDemo() {
  return (
    <div className="flex min-h-[360px] w-full flex-col items-center justify-center gap-8 p-8">
      <div className="flex flex-wrap items-center justify-center gap-4">
        <LiquidButton className="h-12 px-6 text-sm">
          Get started
          <ArrowRight className="ml-2 size-4" />
        </LiquidButton>
        <LiquidButton filled className="h-12 px-6 text-sm">
          <Heart className="mr-2 size-4" />
          Filled
        </LiquidButton>
        <LiquidButton delay="0.6s" fillHeight="6px" className="h-12 px-6 text-sm">
          <Download className="mr-2 size-4" />
          Slow pour
        </LiquidButton>
      </div>
      <p className="text-sm text-muted-foreground">
        Hover or focus a button: the colour pours in from the bottom.
      </p>
    </div>
  );
}

Dependencies

More by terra vidhal

View all
  • Topographic Lines

    Topographic Lines

    4
  • Gravity Stars Background

    Gravity Stars Background

    4
  • Spotlight Card

    Spotlight Card

    3
  • Marquee

    Marquee

    2
  • Firework Burst

    Firework Burst

    1
  • Aurora Bubbles

    Aurora Bubbles

    1
  • Glyph Field

    Glyph Field

  • Shimmering Text

    Shimmering Text

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.