Buttons & actions / Buttons

Condensed Uppercase Button Pair

Rectangular small-radius buttons with icon plus uppercase condensed label: a solid pale-grey primary and a translucent secondary on cobalt; on paper the primary inverts to solid cobalt with pale text and secondary outlines in hairline.

Rebuilt from hermes-agent.nousresearch.com in the Electric Ultramarine Engraving style.

npx shadcn@latest add https://justyoink.it/r/electric-ultramarine-engraving/blocks/pale-pill-buttons.json

Looks exactly like hermes-agent.nousresearch.com: brings its fonts and colours, namespaced so your own theme stays untouched.

Usage

Props: primaryLabel, secondaryLabel, onPrimary, onSecondary, and surface ("cobalt" | "paper") for the starting background. The small toggle under the buttons switches the surface variant; hover triggers the 160deg gradient sweep over 150ms.

components/pale-pill-buttons.tsx
import { useState } from "react";

type Props = {
  primaryLabel?: string;
  secondaryLabel?: string;
  onPrimary?: () => void;
  onSecondary?: () => void;
  surface?: "cobalt" | "paper";
};

function DownloadIcon() {
  return (
    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M12 4v11" />
      <path d="m7 11 5 5 5-5" />
      <path d="M5 20h14" />
    </svg>
  );
}

function CloudIcon() {
  return (
    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinejoin="round" aria-hidden="true">
      <path d="M7 18a4 4 0 0 1-.5-7.97A5.5 5.5 0 0 1 17 8.5a4.75 4.75 0 0 1 0 9.5z" />
    </svg>
  );
}

export default function CondensedButtonPair({
  primaryLabel = "Download for Linux",
  secondaryLabel = "Start in the browser",
  onPrimary,
  onSecondary,
  surface = "cobalt",
}: Props) {
  const [mode, setMode] = useState(surface);
  const onPaper = mode === "paper";

  const base =
    "relative inline-flex items-center gap-2 h-9 px-4 rounded-sm font-display uppercase text-[15px] tracking-[0.01em] whitespace-nowrap bg-no-repeat bg-[length:100%_320%] bg-[position:0_100%] hover:bg-[position:0_0%] transition-[background-position,color,border-color] duration-150 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-paper";

  const primary = onPaper
    ? "text-paper bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-cobalt-deep)_20%,var(--color-cobalt-deep)_100%)] bg-cobalt hover:text-paper"
    : "text-cobalt bg-paper bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-paper-tint)_20%,var(--color-paper-tint)_100%)] hover:text-cobalt-deep";

  const secondary = onPaper
    ? "text-cobalt-deep border border-cobalt-deep/30 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-cobalt)_20%,var(--color-cobalt)_100%)] hover:text-paper"
    : "text-paper bg-hairline-light/20 bg-[linear-gradient(160deg,transparent_0%,transparent_15%,var(--color-link-blue)_20%,var(--color-link-blue)_100%)] hover:text-paper";

  return (
    <div className={`flex flex-col gap-4 p-6 sm:p-10 ${onPaper ? "bg-paper" : "bg-cobalt"}`}>
      <div className="flex flex-wrap items-center gap-2">
        <button type="button" onClick={onPrimary} className={`${base} ${primary}`}>
          <DownloadIcon />
          <span>{primaryLabel}</span>
        </button>
        <button type="button" onClick={onSecondary} className={`${base} ${secondary}`}>
          <CloudIcon />
          <span>{secondaryLabel}</span>
        </button>
      </div>
      <button
        type="button"
        onClick={() => setMode(onPaper ? "cobalt" : "paper")}
        className={`self-start font-mono text-[11px] uppercase underline underline-offset-4 ${onPaper ? "text-cobalt-deep" : "text-paper"}`}
      >
        Preview on {onPaper ? "cobalt" : "paper"}
      </button>
    </div>
  );
}

Quality checks

Automated, in a real browser · 5d ago
—

More from Electric Ultramarine Engraving

The whole style →

Numbered Engraving Feature Grid

Feature sections

Weathered Texture Compare Hero

Heroes

Cobalt Engraving Hero

Heroes

Spaced Mono Navigation Bar

Headers & nav bars

Install Command Tabs

Code blocks

Muted Painting Terminal Video

Media & mockups