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
  • Morphing Text

    Morphing Text

  • Image Zoom

    Image Zoom

  • File Drop

    File Drop

  • Sliding Number

    Sliding Number

  • Gravity Stars Background

    Gravity Stars Background

Explore more

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