Buttons & actions / Floating buttons

Glass Circular Play Button

Small translucent circular button with play triangle placed at the corner of media tiles.

Rebuilt from mercury.com in the Twilight Ledger style.

npx shadcn@latest add https://justyoink.it/r/twilight-ledger-0e1ecf/blocks/glass-circle-button.json

Looks exactly like mercury.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Renders a translucent circular play/pause button over a small sample tile. Props: label (aria-label when paused), defaultPlaying, and onToggle(playing) callback; clicking toggles the icon and hover brightens the glass.

components/glass-circle-button.tsx
import { useState } from "react";

export default function GlassCircularPlayButton({ label = "Play animation", defaultPlaying = false, onToggle }: { label?: string; defaultPlaying?: boolean; onToggle?: (playing: boolean) => void }) {
  const [playing, setPlaying] = useState(defaultPlaying);
  return (
    <div className="relative flex h-40 w-72 items-end rounded-xl bg-powder-blue p-3">
      <div className="absolute left-6 top-6 rounded-md bg-white px-4 py-3 text-ink-dark shadow-card-lift">
        <p className="text-label">Ops / Payroll</p>
        <p className="text-caption text-ink-dark-muted">$2,023,267.12</p>
      </div>
      <button
        type="button"
        aria-label={playing ? "Pause animation" : label}
        aria-pressed={playing}
        onClick={() => {
          const next = !playing;
          setPlaying(next);
          onToggle?.(next);
        }}
        className="relative flex h-10 w-10 items-center justify-center rounded-pill border border-ink-dark/20 bg-glass-fill text-ink-dark backdrop-blur-md transition-colors duration-hover-wash ease-hover-wash hover:bg-white/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent"
      >
        {playing ? (
          <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" aria-hidden="true">
            <rect x="2" y="1" width="3.5" height="12" rx="1" />
            <rect x="8.5" y="1" width="3.5" height="12" rx="1" />
          </svg>
        ) : (
          <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" aria-hidden="true">
            <path d="M3 1.5v11a.8.8 0 0 0 1.2.7l9-5.5a.8.8 0 0 0 0-1.4l-9-5.5A.8.8 0 0 0 3 1.5Z" />
          </svg>
        )}
      </button>
    </div>
  );
}

Quality checks

Automated, in a real browser · 4d ago
—

More from Twilight Ledger

The whole style →

Light Release Notes Header

Changelog

Cinematic Landscape Hero

Heroes

Frosted Transparent Header

Headers & nav bars

Glass Email Capture Pill

Forms

Accordion Feature List with Product Mock

Feature sections

Dark Glass Account Panel Mockup

Media & mockups