ham7a311

Slosh Button

Buttons

About

A toggle button shaped like a glass capsule partly filled with liquid that sloshes and tips as you move your cursor across it, filling to the brim and showing a done label when pressed.

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

Code

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

Usage.tsx

"use client";

import { SloshButton } from "@/components/ui/slosh-button";

export default function SloshButtonDemo() {
  return (
    <div className="flex min-h-full w-full items-center justify-center p-8 bg-[#0b0a0d]">
      <div className="flex flex-col items-center gap-5 text-center">
        <div>
          <p className="font-mono text-[0.6875rem] uppercase tracking-[0.14em] text-[#9c96a1]">
            Nizwa Souq · Rose water, 250 ml
          </p>
          <p className="mt-2 text-[1.25rem] font-semibold tracking-[-0.02em] text-[#efe8dc]">
            Jebel Akhdar rose water
          </p>
          <p className="mt-1 text-[0.875rem] text-[#9c96a1]">
            OMR 4.500 · distilled in April
          </p>
        </div>
        <SloshButton theme="night" label="Save for later" doneLabel="Saved" />
        <p className="text-[0.75rem] text-[#9c96a1]">
          Move across it slowly, then quickly
        </p>
      </div>
    </div>
  );
}

More by ham7a311

View all
  • Wave Mesh

    Wave Mesh

    249
  • Route Globe

    Route Globe

    195
  • Glass Tiles

    Glass Tiles

    183
  • Orbit Ring Stats

    Orbit Ring Stats

    82
  • Glyph Swell

    Glyph Swell

    76
  • Fan Deck Card

    Fan Deck Card

    73
  • Ask Bar

    Ask Bar

    63
  • Glass Ribbons

    Glass Ribbons

    53

More in Buttons

View all
  • Button

    Button

    166
  • Texture Button

    Texture Button

    121
  • Button

    Button

    21
  • Figma File Button

    Figma File Button

    39
  • Native Button

    Native Button

    12
  • Button

    Button

    88
  • HeroUI Button Group

    HeroUI Button Group

    11
  • Great UI Button

    Great UI Button

    19