Buttons & actions / Buttons

Dark Glass Button Pair

Primary button: #141517 fill, 12px radius, gradient hairline border and semibold text with optional chevron; secondary is a transparent ghost button in gray text. Inverted white variant used for Compose and Send.

Rebuilt from resend.com in the Obsidian Serif Glow style.

npx shadcn@latest add https://justyoink.it/r/obsidian-serif-glow/blocks/dark-glass-button-pair.json

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

Usage

Props: primaryLabel, secondaryLabel, invertedLabel, click handlers for each, and showInverted to toggle the white Compose/Send variant. Renders standalone with no props.

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

type Props = {
  primaryLabel?: string;
  secondaryLabel?: string;
  invertedLabel?: string;
  onPrimaryClick?: () => void;
  onSecondaryClick?: () => void;
  onInvertedClick?: () => void;
  showInverted?: boolean;
};

const Chevron = () => (
  <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true" className="transition-transform duration-200 group-hover:translate-x-0.5">
    <path d="M6 3.5 10.5 8 6 12.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
  </svg>
);

export default function DarkGlassButtonPair({
  primaryLabel = "Start building",
  secondaryLabel = "Read the guide",
  invertedLabel = "Compose",
  onPrimaryClick,
  onSecondaryClick,
  onInvertedClick,
  showInverted = true,
}: Props) {
  const [pressed, setPressed] = useState(false);
  return (
    <div className="flex min-h-[240px] w-full flex-col items-center justify-center gap-6 bg-background p-8">
      <div className="flex flex-wrap items-center justify-center gap-4">
        <button
          type="button"
          onClick={onPrimaryClick}
          onMouseDown={() => setPressed(true)}
          onMouseUp={() => setPressed(false)}
          onMouseLeave={() => setPressed(false)}
          className={`group inline-flex items-center gap-2 rounded-xl bg-[#141517] px-5 py-3 text-ui font-semibold text-primary/90 border border-hairline transition-all duration-200 hover:border-secondary/60 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue ${pressed ? "shadow-none scale-[0.98]" : "shadow-[0_6px_20px_rgba(0,0,0,0.6),inset_0_1px_0_rgba(255,255,255,0.08)]"}`}
        >
          {primaryLabel}
          <span className="text-muted group-hover:text-primary"><Chevron /></span>
        </button>
        <button
          type="button"
          onClick={onSecondaryClick}
          className="group inline-flex items-center gap-2 rounded-xl bg-transparent px-5 py-3 text-ui font-semibold text-secondary transition-colors duration-150 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue"
        >
          {secondaryLabel}
          <Chevron />
        </button>
        {showInverted && (
          <button
            type="button"
            onClick={onInvertedClick}
            className="inline-flex items-center gap-2 rounded-xl bg-paper px-5 py-3 text-ui font-semibold text-[#0a0a0a] transition-all duration-150 hover:brightness-90 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-blue"
          >
            {invertedLabel}
          </button>
        )}
      </div>
    </div>
  );
}

Quality checks

Automated, in a real browser · 5d ago
—

More from Obsidian Serif Glow

The whole style →

Blue Glass Agent Config Card

Forms

Hairline Use-Case Grid

Feature sections

Serif Hero with Dark 3D Object

Heroes

Monochrome Logo Cloud

Logo clouds

Language Picker and Code Window

Code blocks

Glossy Icon Section Header

Feature sections